Need help getting Oracle Java to work

Questions about applications and software
Forum rules
Before you post please read this

Need help getting Oracle Java to work

Postby ittech70 on Fri Nov 23, 2012 11:22 pm

I have tried installing Oracle Java 7 update 9 (jdk and jre) in Nadia but neither one will work.

I have used the commands:

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_09/bin/javac" 1
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_09/bin/java" 1
sudo update-alternatives --set "javac" "/usr/lib/jvm/jdk1.7.0_09/bin/javac"
sudo update-alternatives --set "java" "/usr/lib/jvm/jre1.7.0_09/bin/java"

I have configured my PATH and JAVA_HOME by adding the following to my .bashrc:
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_09
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export PATH

When I type java or java -version I get the error message: bash: /usr/bin/java: No such file or directory

If I navigate to /usr/lib/jvm/jdk1.7.0_09 and type ./java or ./javac I stil get that error message.

Typing echo $JAVA_HOME will show: /usr/lib/jvm/jdk1.7.0_09

I have run the command, sudo update-alternatives --config java, to try this method but this does not help either. When I do run that command I see the following:

Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto mode
1 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
* 2 /usr/lib/jvm/jre1.7.0_09/bin/java 1 manual mode

I have had Oracle Java working in previous versios of Linux Mint and Ubunto but I cannot get it working in this one. Does anyone have any ideas that may help. I have even tried reinstalling Mint. Also, is it possilbe to completly remove openjdk? I have tried but when I remove openjdk6 openjdk7 will install, and when I try to remove openjdk7 openjdk6 get installed again.

Thanks for any help.
ittech70
Level 1
Level 1
 
Posts: 2
Joined: Fri Nov 23, 2012 11:15 pm

Linux Mint is funded by ads and donations.
 

Re: Need help getting Oracle Java to work

Postby wayne128 on Fri Nov 23, 2012 11:26 pm

Since you are using Ubuntu based Mint, the easier method to install oracle java is to use ppa.

this is the link
http://www.webupd8.org/2012/01/install- ... u-via.html
wayne128
Level 10
Level 10
 
Posts: 3322
Joined: Tue Jul 13, 2010 12:15 am

Re: Need help getting Oracle Java to work

Postby ittech70 on Fri Nov 23, 2012 11:35 pm

Thanks for the link. I saw that before but was not sure if it was a trusted PPA.
ittech70
Level 1
Level 1
 
Posts: 2
Joined: Fri Nov 23, 2012 11:15 pm


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 22 guests