Technical Blog about all things computer

  • Jul 14

    To Install Java on Debain 5.0 (Lenny).

    After installing Lenny from the DVD, you may run into errors with java apps even though it appears that java has already been installed. To fix this install the java package.

    Edit the sources file so that your operating system will know where to upload the latest Java package.

    1.) edit  /etc/apt/sources.list

    2.) Add the following to your sources.list

    deb lenny main non-free

    deb-src lenny main non-free

    3.) Update sources by running:

    apt-get update

    4.) Install the Java JDK as follows:

    apt-get install sun-java6-jdk

    5.) Make java available system wide:
    update-java-alternatives -s java-6-sunecho ‘JAVA_HOME=”/usr/lib/jvm/java-6-sun”‘ | tee -a /etc/environment

    6.) create a sym link to the installed java directory:

    ln -s /user/lib/jvm/java-6-sun /usr/lib/java

    7.)  Create a class path by editing:


    8.) Add the follwoing line to the bottom of the /etc/profile file:

    export JAVA_HOME