
Then, check if Java is not already installed: java -version First, update the package index: sudo apt-get update Following is the detailed process which covers almost all possible failures. I think you should consider Java installation procedure carefully. Repeat the above for: sudo update-alternatives -config javac Press enter to keep the current choice, or type selection number: 3 update-alternatives: using /usr/lib/jvm/jdk1.7.0_75/bin/java to provide /usr/bin/java (java) in manual mode

* 0 /usr/lib/jvm/java-6-oracle1/bin/java 1047 auto modeĢ /usr/lib/jvm/java-6-oracle1/bin/java 1047 manual modeģ /usr/lib/jvm/jdk1.7.0_75/bin/java 1 manual mode There are 3 choices for the alternative java (providing /usr/bin/java). Now try: $ sudo update-alternatives -config java Sudo update-alternatives -set javaws /home/xxxxx/sipTest/jdk1.8.0_201/bin/javaws Sudo update-alternatives -set javac /home/xxxx/java/sipTest/jdk1.8.0_201/bin/javac sudo update-alternatives -set java /home/xxxx/sipTest/jdk1.8.0_201/bin/java Tell Ubuntu that our installation i.e., jdk1.8.0_05 must be the default Java. Sudo update-alternatives -install /usr/bin/javaws javaws /home/xxxx/java/jdk1.8.0_201/bin/javaws 20000


Sudo update-alternatives -install /usr/bin/javac javac /home/xxxx/java/jdk1.8.0_201/bin/javac 20000 sudo update-alternatives -install /usr/bin/java java /home/xxxx/java/jdk1.8.0_201/bin/java 20000 Let Ubuntu know where our JDK/JRE is located. Set path JAVA_HOME=path of your jdk folder(open jdk folder then right click on any folder, go to properties then copy the path using select all) like: /home/java(Folder name created by user in home directory). Download java jdk-linux-圆4.tar.gz file from.
