I installed Oracle Java 1.8 using ppa. When I list java alternatives, I can only see 1.8 JRE! But when I do
javac -version
I can see
javac 1.8.0_05
sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1073 auto mode
1 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1071 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1072 manual mode
* 3 /usr/lib/jvm/java-8-oracle/jre/bin/java 1073 manual mode
Here is what I see when I run
sudo update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-8-oracle/bin/javac 1073 auto mode
1 /usr/lib/jvm/java-7-oracle/bin/javac 1072 manual mode
* 2 /usr/lib/jvm/java-8-oracle/bin/javac 1073 manual mode
Press enter to keep the current choice[*], or type selection number:
I can only see 1.8 JRE in Eclipse and not 1.8 JDK. What am I missing? I want to be able to create a Java project targeting JDK 1.8.
It looks like I have javac
setup fine but why does it not show up in Eclipse in the list of JDK?
sudo update-alternatives --config javac
instead. The JDK is likely to be located in/usr/lib/jvm/
. – saiarcot895 Apr 25 '14 at 00:46