LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   both openjdk and oracle jdk on debian (https://www.linuxquestions.org/questions/linux-newbie-8/both-openjdk-and-oracle-jdk-on-debian-4175526944/)

Reprovo 12-01-2014 02:27 AM

both openjdk and oracle jdk on debian
 
Hi.
I've Installed oracle JDK version 1.8 on a debian machine that already has openjdk 1.6.i've set the path variable in etc/login.defs and java_home variable In etc/environment.
When I echo $JAVA_HOME it points to the oracle version correctly and when I run javac It uses the oracle 1.8 version.
The problem is when I run the java command , It runs the openjdk 1.6 version and I'm not sure why.If I type java -version It shows the openjdk version.

Reprovo 12-01-2014 07:01 AM

I didn't notice openjdk was set before oracle java.
I was looking for a /usr/lib/jvm In the $PATH but It's also set In /usr/sbin which I didn't know.


All times are GMT -5. The time now is 10:11 AM.