HELP Configuring JDK6 on Linux
I am running KUBUNTU Linux and want to use the new Java6 Development Platform. Right now I have java4. What I can't figure out is how to tell the system to defualt to Java6 or remove Java4 and reinstall java6 into the proper directory. Everything is installed, but when ever I try to complie a program with javac, I get the error import java.util.Scanner cannot be resolved. Can anyone help me with this problem?
# 1
If you have the java binaries installed from the original KLUBUNTU distribution (e.g. Feisty) you will have a link from
/usr/bin/java -> /etc/alternatives/java -> /usr/lib/j2se/bin/java
and a similar construct for javac (or to a repacement program for javac like gjc)
I you have successfully installed the JDK v6 to "your directory" you have to build the new links only.
E.g. as root:
cd /usr/bin
rm java
ln -s "your directory"/jdk1.6xxx/bin/java java
rm javac
ln -s "your directory/jdg1.6xxx/bin/javac
This should work. You van verify this by typing
java -version
and
javac -version
Good luck