How to install Sun Java on Debian

Installing java on Debian is a kind of tricky steps. It is not necessary to follow below procedures if you don't care about what Sun will do on your linux box and you don't care about unknown files after uninstallation. You should create a deb package for each Java package for easily management later.

  1. Install fakeroot and java-package.

    apt-get install fakeroot java-package
    

    If you can't find java-package, add below lines to /etc/apt/sources.list.

    deb http://ftp.us.debian.org/debian/ stable contrib
    deb-src http://ftp.us.debian.org/debian/ stable contrib
    
  2. Download JDK 5.0 from http://java.sun.com/javase/downloads/index.jsp. Don't forget to get the latest update. For me it is JDK 5.0 Update 8. Finally, you should get jdk-1_5_0_08-linux-i586.bin or something like this.

  3. Run make-jpkg as follow.

    fakeroot make-jpkg jdk-1_5_0_08-linux-i586.bin
    
  4. Verify detected version and press Y.

  5. Enter your full name.

  6. Enter your email address.

  7. Press Enter to continue.

  8. Press Spacebar until reach the end of license terms

  9. Press yes to agree.

  10. Wait a few minutes and you will get sun-j2sdk1.5_1.5.0+update08_i386.deb

  11. Install the deb package.

    dpkg -i sun-j2sdk1.5_1.5.0+update08_i386.deb
    

Tags: , ,

Post new comment