I have noticed many developers complaining about the pain of juggling multiple JDK (
alternatives --config java) and Eclipse installations. This post is meant for them. So, this is primarily for beginners.
Note: The following was done on Ubuntu 16.04.
Install Eclipse 4.10M1
Go to the following URL.
Scroll down to the section Eclipse SDK and download Linux (64 bit version) to your
Verify the file.
sha512sum ~/Downloads/YOUR_DOWNLOADED_FILE (Replace YOUR_DOWNLOADED_FILE with the actual name of the downloaded file.)
The SHA512 values are available here.
For the file which you downloaded, it should be
Create a directory for your Eclipse installation
mkdir -p ~/installs
Remove any existing Eclipse installation
Warning: If you have an existing installation under
~/installs/eclipset, make sure to copy it somewhere else beforehand!
rm -rf ~/installs/eclipse
Extract Eclipse to the directory
tar -zvxf ~/Downloads/eclipse-SDK-4.10M1-linux-gtk-x86_64.tar.gz --directory ~/installs
Rename Eclipse directory so that you can distinguish between versions later
mv ~/installs/eclipse ~/installs/eclipse-4.10M1
Create a link on Desktop
You can create a desktop file as well for a shortcut, but the link is easier to create and works just as well.
Browse to your home directory and go to
installs/eclipse-4.10M1 under that. Right click on eclipse executable and select “Make link”. A new “Link to eclipse” will appear. Right-click, “Cut” and paste to your desktop. Rename it to “eclipse-4.10M1”.
Double-click on the newly created desktop icon. Select a workspace or type one.
Install JDK 11
Download Open JDK 11 from here:
Note: If this link does not work, go here to get the updated link. Make sure to change the file name in the extraction step below.
Download it to your
Extract it to the previously created installs directory:
tar -zvxf ~/Downloads/openjdk-11.0.1_linux-x64_bin.tar.gz --directory ~/installs
Your JDK 11 installation will be available under
installs/jdk-11 under your home directory.
Configure Eclipse to use JDK11
In Eclipse, go to Window -> Preferences -> Java -> Installed JREs.
Add -> Standard VM
Select your JDK installation under
Select the newly created JRE
Under the same Preferences tab, go to Java -> Compiler
Select Compiler compliance level as 11
Apply and Close
There you go. That should help you get started, without messing up any of your existing configurations!