Posted on September 28, 2018 by Paul
Updated 15 October 2019
The Java Development Kit (JDK), officially named 'Java Platform Standard Edition' or 'Java SE', is needed for writing Java programs.The JDK is freely available from Sun Microsystems (now part of Oracle). This is what I see on my machine: 1% java -version 2 openjdk version '11.0.4' 2019-07-16 3 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11) 4 OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) 5% javac -version 6 javac 11.0.4 7% If you prefer to use the Java version provided by the OpenJDK website, you will need to. To install JRE onto your PC, you need to know the system type of your device: either 32-bit or 64-bit. To locate the information, right-click on the ‘Start Menu’ in the lower-left corner of the desktop screen and click on ‘System’ in the context menu that arises.
Jul 18, 2018 Java Plug-in technology, included as part of the Java 2 Runtime Environment, Standard Edition (JRE), establishes a connection between popular browsers and the Java platform. Java allows applications to be downloaded over a network and run within a guarded sandbox. I have macOS 10.7.5 and want to update it to a newer version as possible. Currently I’m trying to gradually upgrade it to 10.8 to download a newer version then. But I’m stuck at 10.7.5 and the components for a newer Mac OS X Lion don’t download to my Mac Book Air of 2011.
This is a short note about getting started with Java 11 LTS or Java 13 on macOS Catalina. As you probably know, starting with Java 11 there was a big change in the license under which the official Oracle JDK is provided. In short, you need to buy a license from Oracle if you want to use the official JDK in a commercial setting. As far as I know, using Oracle’s JDK on your private computer for testing and learning purposes is allowed.
That being said, for most users OpenJDK is the new JDK of choice, it is provided under an open source license and you don’t need to pay for using it.
There is also a video version of this tutorial:
At this time, Java 11, the long term release or LTS, of Java is no longer supported on the OpenJDK website. You can still get the archived version, but this is not recommended because it doesn’t include any new security patches. If you still need to use Java 11, use an alternative build like the one from AdoptOpenJDK. From the AdoptOpenJDK page you will download a pkg file that you can install on your macOS machine directly by double clicking on it.
After you’ve installed the AdoptOpenJDKpkg file, check if you can use it with:
This is what I see on my machine:
If you prefer to use the Java version provided by the OpenJDK website, you will need to use Java 13. Start by getting OpenJDK, chose the macOS version. Extract the archive by double clicking on the file or, assuming it is in your Downloads folder, write this in your Terminal:
Next step, is to move the extracted folder to a place where macOS searches for Java JDK:
Now, check if you’ve successfully installed the JDK with:
This is what I see on my machine:
Just to be sure that everything works, try to compile and run a simple program:
Save the above as HelloWorld.java and compile it with:
If you want to run the compiled version:
This is what I see on my machine:
Side note, you can also run directly the program, without the separate compilation step with:
Java 8 Update 231 Build 11 Won't Download Onto My Macbook Air
but this is usually slower than compiling the code with javac and running the compiled code.