Do this:
- Delete all installations of Java.
- Install the Java SDK (self-extracting) into /opt/jdk1.6.0_16 (for example)
- Create a symbolic link:
ln -s /opt/jdk1.6.0_16 /opt/jdk
-
Edit
$HOME/.bashrc
:JAVA_HOME=/opt/jdk
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin -
Logout and log back in.
This offers many advantages:
- You can install multiple versions of the SDK and need only switch a symbolic link.
- You know where all the files are located.
- You know exactly which version of Java is being used.
- No other versions are installed, so there cannot be any conflicts.
I have done this for years and have never had any problems with Java on Linux.
Also, stay away from the OpenJDK as its fonts are terrible to behold.
http://www.kubuntuforums.net/forums/index.php?topic=3105915.5;wap2
http://kubuntuforums.net/forums/index.php?topic=3105915.5;wap2
BEST WAY :http://stackoverflow.com/questions/2224321/problems-installing-java-ee-sdk-on-linux