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:
- use rm -rf to remove the jdk from the system
- re-installed using the above instructions
- 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:
- sudo nano /etc/profile
- . /etc/profile
- sudo update-alternatives –install “/usr/bin/java” “java” “/home/roye/jdk-9.0.1/ bin/java” 1
- sudo update-alternatives –install “/usr/bin/javac” “javac” “/home/roye/jdk-9.0.1/bin/javac” 1
- sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/home/roye/jdk-9.0.1/bin/javaws” 1
- sudo update-alternatives –set java /home/roye/jdk-9.0.1/bin/java
- sudo update-alternatives –set javac /home/roye/jdk-9.0.1/bin/javac
- sudo update-alternatives –set javaws /home/roye/jdk-9.0.1/bin/javaws
- 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