Installing and Maintaining Java part 2

Java is an odd language. It made Object Oriented programming mainstream. I introduced the concept of an interpretive layer to enable Write-Once-Run-Anywhere. Java also introduced the idea of runtime memory management. Prior to Java, developers had to use compilers specific to their hardware. While Java simplified development, it still required a hardware specific layer called the Java Virtual Machine (JVM).

Java has undergone many changes over the years. This has led to a need to test and sometimes modify code to work on new versions. Not often, and usually relegated to vendor provided implementations of standard interfaces, but this sometimes means that developers still need to maintain several versions of java to be able to switch between them easily.

You can get Java in two main releases. The Java Runtime Environment (JRE), and the Java Development Kit (JDK). It’s easy enough to know which you need: the JDK. Why? Well, the JDK includes everything that developers need to write and compile Java code. Some applications need the JDK in order to run correctly. You can often get away with installing just the JRE, if you only want to run Java applications. However, there’s little reason not to just always install the JDK.

Further complicating things, there are several distributions of the JDK.  Oracle is current canonical developer of Java. They maintain the project acquired from Sun years ago. The most popular distribution in use, you can find the Oracle JDK preinstalled on MacOS and Windows now. Several companies and open-source projects have developed their own JDKs. These other distributions duplicate functionality from the Oracle JDK.

IBM provides their own JDK for their Java middleware products, like WebSphere, and their OSes, like z/OS. You can download this from the previous link. We won’t be cover the installation of the IBM JDK on z/OS or the IBM JDK on z Systems hardware. I don’t happen to have mainframes lying around for demonstrations, but the process is much the same. I guess if you’re paying IBM for support, then you might as well use it. Also, you’d only use the IBM JDK for running IBM products.

OpenJDK is pretty much what it sounds like. An open-source implementation of the Oracle JDK. Its main purpose is to provide a JVM outside the licensing control of Oracle. This was done for a variety of reasons and I’ll save that discussion for over drinks at conferences. However, it does give us a JDK we can examine and modify. Most developers just use the Oracle JDK. OpenJDK does have its adherents. Especially amongst the Linux community. Most vendors will support their products on the OpenJDK. Currently, the OpenJDK is only available on Windows and Linux.

There is also Zing from Azul Systems. The main feature of Zing is that it has more flexible and scalable memory management. Java was never intended for the terabytes of memory possible on the top tier hardware. Some use cases need more advanced and intelligent memory management. Azul Systems also included several management and monitoring tools. However, as Zing is a paid product, we won’t be covering it here. Azul Systems does maintain a build of the OpenJDK that we will cover.

Windows

Oracle

OpenJDK

Zulu

 

MacOS

Oracle

Zulu

 

Fedora based Linux

Oracle

OpenJDK

Zulu

 

Red Hat Enterprise Linux / CentOS

Oracle

OpenJDK

Zulu

robert@opensource.io

 

About the Author

>