Java EE 8 Roadmap and Update from JavaOne 2016

September 22, 2016 Leave a comment

Anil Gaul’s keynote showed a JEE8 plan with new scope and release targets.
Oracle says JEE must adjust to trends like cloud and microservices.

The ambitious roadmap aims for JEE8 release in 2017 and JEE9 in 2018:
jee-roadmap

The scope changes include two new JSRs: “Configuration” and “Health Check”:
jee8-revised

Surprisingly, Oracle wants to remove MVC and JMS 2.1 from JEE8 scope.
Allegedly they are “no longer very relevant in the cloud”.
Unfortunately, the roadmap also no longer mentions JCache.

The proposed JEE8 architecture stack is very focused on Java for light-weight web services:
jee8-architecture

More details are in the “Java EE 8 Update” by Linda DeMichiel:

Categories: conference, java, javaone Tags: , ,

Install portable JDK on Windows without admin rights

September 15, 2016 Leave a comment

I found the basic idea here, the exact steps are:

iron-java-mug_120x120

  1. Install Portable 7zip
  2. Download Oracle JDK installer for Windows (*.exe)
  3. Run 7-ZipPortable.exe from your Portable 7zip
  4. In 7zip find and right-click the jdk installer exe file
  5. From the context menu use 7-Zip – Open Archive and then Extract
  6. Now extract the resulting “tools.zip” to a folder that is writable for you
  7. Open a cmd.exe, cd into the folder and execute this:
for /R %f in (.\*.pack) do @"%cd%\bin\unpack200" -r -v -l "" "%f" "%~pf%~nf.jar"

Kudos to Nick Russler for figuring out this tricky unpack200 command line!

Categories: dev-tools, java, windows Tags: , ,

Determine which Tomcat version is running

August 6, 2016 7 comments

Determine process id

First we determine the process id(s) of the running Tomcat instance(s).

We can grep the running process list for ‘catalina.home’:

pgrep -f 'catalina.home'

This might yield more than one pid.

Or we can search by port (8080 is the default, adjust if necessary). The following commands will likely require root privileges:

lsof -t -i :8080

Alternatively, for example if lsof is not installed:

fuser 8080/tcp

Or yet another way, using netstat (or its “ss” replacement):

netstat -nlp | grep 8080
ss -nlp | grep 8080

Determine catalina.home

For the process id(s) determined above, we look at process details:

ps -o pid,uid,cmd -p [pidlist] | cat

For each specified pid, this shows the uid (system user) and the full command line of the process.

Typically the command line will contain something like “-Dcatalina.home=[path]” and that path is the catalina.home system property of the Java process.

Alternatively – with Java 7 and later – we can use the JDK command “jcmd” to query the JVM process for its system properties:

sudo -u [uid] jcmd [pid] VM.system_properties \
   | grep '^catalina.home' \
   | cut -f2 -d'='

Determine version

Now we can finally determine which Tomcat version is installed under the catalina.home path:

[catalina.home]/bin/catalina.sh version \
   | grep '^Server number:'

Note: Please replace [catalina.home] with the path you determined above.

The final output should be something like this:

Server number: 7.0.56.0

My favorite Free/Open Source Intellij Community plugins

July 28, 2016 Leave a comment

Continuous delivery using github, travis-ci and bintray

July 12, 2016 Leave a comment

Continuous-Delivery-schema

Let’s say you work on a Java application and want to frequently make it available for download so that user’s can easily try the latest version.

Let’s say you work primarily on your laptop or personal computer using a Java IDE and commit code changes, but you don’t want to spend time manually building jars, packaging war or zip files, testing your application or uploading files to a website, etc.

Instead you want to have a fully automated process that compiles your source code, runs automated tests and other quality control mechanisms, builds your application and uploads the result to a public website.

But you don’t want to install any infrastructure for this and not run anything besides Java and your IDE on your own machine(s).

Basically you want to use developer-friendly reliable cloud services but you don’t want to pay a single cent.

All of this is possible, as long your code is Open Source:

  • Host your source code on github
  • Let travis-ci run vour build process
  • Let travis-ci upload the build result to bintray

For details, you can take a look at one of my github projects.

Relevant config files:

Soon I will probably add more detailed instructions to this blog post on how to set up the cloud services.

Categories: coding, git, java, maven Tags: , ,

Some pure CSS buttons

July 6, 2016 Leave a comment

Do you still use gifs or other pixel graphics for buttons on web pages? I hope not. CSS3 support is available in all modern browsers, so rounded corners, gradients, shadows, etc are no problem.

See this jsfiddle for the CSS class definitions and a minimal HTML sample.

Without box shadow:

Oliver Doepner

Oliver Doepner

Oliver Doepner

With box shadow:

Oliver Doepner

Oliver Doepner

Oliver Doepner

Categories: coding

OpenJDK builds for Windows now available from Redhat

June 29, 2016 Leave a comment

As I mentioned in an earlier post, officially supported OpenJDK builds for non-Linux platforms have been notoriously hard to come by in the past, at least until Azul started their Zulu builds in 2013. Unofficial community builds are also available from the ojdkbuild project on Github.

Today Redhat announced that their OpenJDK offerings now include builds for the Windows platform as well.

After Google decided to use OpenJDK in Android N, I guess this is another strong indicator of OpenJDK’s value and increasingly wide adoption.

Categories: java, windows Tags: , ,