Originally posted by James Hambrick:
whoops. I have Ubunto 7.10. I did download it from Suns site. I then made the .tar/.bin file executable using chmod +x <filename> and then ran it like this
./<filename> went through and accepted all the agreements and everything. If it's easier to install using the Ubuntu installer then how do I get rid of what I installed? Will the Ubuntu installer just overwrite it and set the correct settings. I don't know how to set Java on my execution path.
export JAVA_HOME=/usr/java/jdk1.6.xxxxx
export PATH=$JAVA_HOME/bin:$PATH
I loathe "alternatives". It's too complex, especially in the case of Java, where there's multiple items that need to be switched. So I ignore them and manually put the JVM I prefer in my path ahead of the alternatives java.
Note that the Sun JDK can live in any directory you want, though the RPM installs will put it in /usr/java by default. That's good enough for me, so even on non-Redhat (and even non-Linux) systems, I normally do likewise.