simple install sun java

a quick and eazy way to install java under linux

1. download jre or jdk from www.java.com

2. create a directory to hold the versions

# mkdir /usr/java

3. extract the tar file under the directory

# tar -xzvf jre-7u45-linux-x64.tar.gz -C /usr/java
# ln -s /usr/java/jre1.7.0_45 /usr/java/jre-latest

4. the last part is to create links in the system in order to
make sure it uses this new java version we just extracted .

* global java command

debian linux based version:

# update-alternatives --install /usr/bin/java java /usr/java/jre-latest/bin/java 90
# update-alternatives --config java

RedHat linux based version :

# alternatives --install /usr/bin/java java /usr/java/jre-latest/bin/java 90
alternatives --config java

browsers links

ln -s /usr/java/jre-latest/lib/amd64/libnpjp2.so <path to install dir>/plugins/
Posted in Tips and Tricks Tagged with: ,