I want to install the oracle jdk 6 in ubuntu for all users using the self extracting installer at oracles website (jdk-6u37-linux-x64.bin)
This is what i do step by step:
1- Download the jdk-6u37-linux-x64.bin
2- Create a folder in the unix system resources and move the downloaded file there
sudo mkdir -p /usr/local/java
sudo mv /home/sfrj/Downloads/jdk-6u37-linux-x64.bin /usr/local/java
3- Make the file executable
sudo chmod 700 jdk-6u37-linux-x64.bin
4. Execute the installer
sudo ./jdk-6u37-linux-x64.bin
5. Remove the installer(Don't need it anymore)
sudo rm jdk-6u37-linux-x64.bin
6. Create a symbolic link
sudo ln -s jdk1.6.0_37 /usr/local/java/latest
7. Edit the file /etc/environment
JAVA_HOME="/usr/local/java/jdk1.6.0_37"
JRE_HOME="/usr/local/java/jdk1.6.0_37/jre"
PATH="/usr/local/java/jdk1.6.0_37/bin:\/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
8. Reload the environment file
source /etc/environment
So far so good, after all that and without closing the terminal I type: java -version and I see this:
java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
The problem is, when close the terminal, open it again and type the command java -version again, I see this:
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 <selected package>
I am confused:
-Why is this?
-Did I install the jdk correctly?
-What is missing?
I want to install it this way, without using apt-get, so please don't answer to me use apt-get install...