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
- Go to http://jdk.java.net/11/
- Download the Open JDK tar.gz file (It’s about 300 MB)
- Unzip
- 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
- 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