Not recognize JDK after installation in ubuntu 12.10
- by HFDev
I did these steps without error:
1-JDK path : Downloads/jdk-6u37-linux-x64.bin
2-Commands in Terminal :
mkdir Programs
cd Programs
bash ../Downloads/jdk-6u37-linux-x64.bin
ln -s jdk-6u37-linux-x64 jdk
3-Set JAVA_HOME and Path:
in HomeView MenuShow Hidden Files
Then open .bashrc in text editor.
I added the following lines to end of file.
export JAVA_HOME=$Home/Programs/jdk
export PATH=:$JAVA_HOME/bin:$PATH
---------------------------------------------------------------------------------------
This is the result of executing the command echo $JAVA_HOME :
/Programs/jdk
This is the result of executing the command echo $PATH :
:/Programs/jdk/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games1
----------------------------------------------------------------------------------------
And problem is :
This is the result of executing the command java -version :
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* gcj-4.7-jre-headless
* openjdk-7-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install