Installing Sun Java on Debian Lenny

The Sun Java JDK is available in the Debian Lenny non-free repository, therefore you must modify /etc/apt/sources.list

 

vi /etc/apt/sources.list

 

and add non-free to the Debian Lenny repositories:

 

deb http://mirrors.kernel.org/debian/ lenny main non-freedeb-src http://mirrors.kernel.org/debian/ lenny main non-free

deb http://security.debian.org/ lenny/updates main non-freedeb-src http://security.debian.org/ lenny/updates main non-free

 

Run

 

apt-get update

 

Install the Java JDK as follows:

 

apt-get install sun-java6-jdk

 

Make it available system wide:

 

update-java-alternatives -s java-6-sunecho 'JAVA_HOME="/usr/lib/jvm/java-6-sun"' | tee -a /etc/environment

 

This entry was posted in systems administration and tagged , , . Bookmark the permalink.

10 Responses to Installing Sun Java on Debian Lenny

  1. phasesync says:

    Thank you! I finally managed to install the Android plugin in Eclipse without it naging about some "thrust" thingy. It was all about using the wrong JRE. I still would like to know why it does not work with OpenJDK. But I'm glad it works.

  2. Franko says:

    Thanks for this article.
    Simple and clear, everything worked out.
    All the best!

  3. Gaspar says:

    Direct and concise. Thanks for the quick recipe :-)

  4. Alex says:

    Fantastic! Great help, thanks!

  5. Lotfi says:

    Very usefull tutorial.
    thank you.

  6. ajit says:

    Simple yet precise avoids all kinds of complex intricacies, have used this method to build many servers.

  7. umarzuki says:

    it suppose to be
    # update-java-alternatives -s java-6-sun ;echo ‘JAVA_HOME=”/usr/lib/jvm/java-6-sun”‘ | tee -a /etc/environment

    for the last command

  8. kenneth says:

    Segmentation fault (core dumped)??

  9. @kenneth, if you’re asking me it has been a while since I wrote this post so I do not recall…

  10. Koratsuki says:

    Pretty nice article, I don’t like Java, but many programs need it… Always a mess, when I try to configure it, but many thanks to you, you enlightened me… :D

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>