Installing Sun-Java 6 on Debian
Posted: August 28, 2010 Filed under: General Admin, IT Survival, Linux 7 CommentsArrrrgggghhhhhhhhh !!!! why is Linux such a pain in the arse sometimes
To get Sun-Java-6 on a Debian box then follow the instructions. I think there is a Repo out there so you can use apt-get but I could not find it.
I am running on a 32bit in this config so all the file relate to the setup.
The bits can be downloaded from here
The following will get you going, I think these are in the correct order but it was a pain an then worked, these tough are all the files that you need though.
apt-get install odbcinst1debian1
http://ftp.us.debian.org/debian/pool/main/u/unixodbc/unixodbc_2.2.11-16_i386.deb
http://ftp.us.debian.org/debian/pool/non-free/s/sun-java6/sun-java6-jre_6-20-0lenny1_all.deb
http://ftp.us.debian.org/debian/pool/non-free/s/sun-java6/sun-java6-bin_6-20-0lenny1_i386.deb
http://ftp.us.debian.org/debian/pool/non-free/s/sun-java6/sun-java6-jdk_6-20-0lenny1_i386.deb
Then install each one in order
dpkg -i xxxxxxxxxxxxxxxxx
If you already have a Java installation issue this command
update-alternatives –config java
and choose the number for the appropriate Java version you want.
java version
Should display the version of Java that you want.
You should add this to you environment
cd ~
vi .bashrc
and add the two lines
export JAVA_HOME=/usr/lib/jvm/java-6-sun/bin
export PATH=$PATH:/usr/lib/jvm/java-6-sun/bin
The paths maybe different depending on where the installation took place. Change accordingly
[…] To get Sun-Java-6 on a Debian box then follow the instructions. I think there is a Repo out there so you can use apt-get but I could not find it. more here […]
Just enable non-free repos and do
apt-get install sun-java6-bin
Cheerio
Hi could you please explain how to enable the non-free repos, this site is for everyone who is just starting out or needs an easy guide to do things, this includes me on many aspects of Linux. Al
In /etc/apt/sources.list add a line like
#
deb http://ftp.debian.org/debian lenny main contrib non-free
#
and you will get all the official Debian Lenny packages.
Sun java is in the Debian repos in non-free.
aptitude install sun-java6-plugin or sun-java6-jdk
Will install java. No need to download or tweak anything.
Hello,
unless you depend on anything that is only available in Sun Java, you might consider installing OpenJDK instead. It’s available from the main repo, so you don’t need non-free.
echo deb http://ftp.us.debian.org/debian/ squeeze main non-free | tee -a /etc/apt/sources.list
apt-get update && apt-get install sun-java6-jdk sun-java-jre