how to install open jdk 11

Main menu:

Topics

Recent Posts

Feeds

RSS Feed RSS - Posts

May 2018
M T W T F S S
« Mar   Jun »
 123456
78910111213
14151617181920
21222324252627
28293031  

Past Posts

Java/Java EE

JDBC

Other

how to install open jdk 11

May 13th, 2018 by Jeanne Boyarsky

Since I’m speaking at QCon about Java 11, I figure I should install it instead of just having read about it :).

Wait? Will this mess up my existing Java install?

No. Open JDK provides tar files. This means you can have as many versions installed as you want.

How to install

  1. Go to http://jdk.java.net/11/
  2. Download the Open JDK tar.gz file (It’s about 300 MB)
  3. Unzip
  4. Move to the directory you typically keep JDKs to make it easy to find. For example, on Mac:
    sudo mv jdk-11.jdk /Library/Java/JavaVirtualMachines
    cd /Library/Java/JavaVirtualMachines
  5. Optionally, add aliases. I like to create javacVersionNumber and javaVersionNumber so I can quickly compare multiple versions. For example, on Mac, I opened .bash_profile and added aliases for java 11 to the ones I already had.
    alias javac11=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/javac
    alias java11=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java 

Comments

Comment from Jeanne Boyarsky
Posted: May 25, 2018 at 2:31 pm

Chandra does something similar except he updates JAVA_HOME as well: https://cguntur.me/2018/05/24/multiple-jdks-on-a-mac/

Write a comment