Installing Sun-Java 6 on Debian


Arrrrgggghhhhhhhhh !!!! 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


7 Comments on “Installing Sun-Java 6 on Debian”

  1. […] 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 […]

  2. Ivan says:

    Just enable non-free repos and do
    apt-get install sun-java6-bin

    Cheerio

  3. craigevil says:

    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.

  4. Giorgos says:

    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.

  5. budiana says:

    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


Leave a reply to budiana Cancel reply