Upgrading to Ubuntu 17.04 – installing Eclipse and Oracle JDK 9

One of the pages to install Eclipse is https://itsfoss.com/install-latest-eclipse-ubuntu/ Unfortunately I wanted re-install in a different directory and the page’s constructions to remove an install came back saying  that Eclipse Java was not installed.

So I did the following steps:

  1. use rm -rf to remove the jdk from the system
  2. re-installed using the above instructions
  3. gedit ~/.local/share/applications/eclipse-java.desktop

eclipse-java.desktop contents:

[Desktop Entry]
Version=1.0
Type=Application
Name=Eclipse
Icon=/home/roye/devTools/eclipse-java/java.png
Exec=”/home/roye/devTools/eclipse-java/eclipse” %f
Comment=Eclipse Java IDE
Categories=Development;IDE;
Terminal=false
NoDisplay=false
Name[en]=Eclipse

 

Installing Oracle JDK 9 instead of Open-JDK:

  1. sudo nano /etc/profile
  2. . /etc/profile
  3. sudo update-alternatives –install “/usr/bin/java” “java” “/home/roye/jdk-9.0.1/ bin/java” 1
  4. sudo update-alternatives –install “/usr/bin/javac” “javac” “/home/roye/jdk-9.0.1/bin/javac” 1
  5. sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/home/roye/jdk-9.0.1/bin/javaws” 1
  6. sudo update-alternatives –set java /home/roye/jdk-9.0.1/bin/java
  7. sudo update-alternatives –set javac /home/roye/jdk-9.0.1/bin/javac
  8. sudo update-alternatives –set javaws /home/roye/jdk-9.0.1/bin/javaws
  9. java –version

add to  /etc/profile after the last `fi`

JAVA_HOME=/home/roye/jdk-9.0.1
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

1 2 3 4 8