How to install Java on Debian woody R2 ?

I am a new user of Debian in Hong Kong . However , there are not so many discussion on Java running under Debian in HK .

After a lot of search on the Web , I find a way to to install Java on Debian woody easily.

I would like to share this to other Debian users . Such that they can find the way to install and run Java on their Debain. Does not need to spend a lot of time to search the web How to ( like me a poor man Sad ). Any comment to improve the installation are welcome .

Below are how it work : -

Install Java on Debian woody:

  1. Download j2se-package:

    j2se-package is a utility for building Java(TM) 2
    related Debian packages

    Insert the following apt-line in your sources.list or
    download and install the packages manually:

    deb http://z42.de debian/
    deb-src http://z42.de debian/
    

    This package provides the capability to create a
    debian package from a Java(TM) 2 distribution by just
    running "j2se-package filename".

    Type the following in the command line to get the j2se-package by running:

    apt-get install j2se-package

  2. Download the Java binary package for linux form Sun website (http://java.sun.com/j2se/downloads.html) to download : j2sdk-1_4_2_04-linux-i586.bin

  3. Convert J2SDK to Debian package by running j2se-package filename

    Command line example:

    j2se-package j2sdk-1_4_2_04-linux-i586.bin

  4. The Debian package will be created in the current
    directory. You can install the package as root
    (e.g. dpkg -i sun-j2sdk1.4_1.4.2+04_i386.deb).

    You should also install the corresponding package with
    Debian specific parts (e.g. apt-get install
    sun-j2sdk1.4debian
    ).

    After that, it is done. Your j2sdk will be working.

  5. To enable the java plugin into Mozilla,login as
    root ( or by su), create a link to the java plugin file
    (libjavaplugin_oji.so) to the
    Mozilla plug in directory. e.g.

    ln -s /usr/lib/j2sdk1.4-sun/jre/plugin/i386/ns610/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

Hope to see more discussion for Java on Debian HK.

Regards ,
K M Lau

Notice: An updated chinese version of this article had been posted in OSWikiHK http://wiki.linux.org.hk/index.php/How_to_install_Java_on_Debian.

回應

評論查看選項

選擇你喜歡的顯示回應的模式,並點選「儲存設定」,以啟用你所做的改變。

Thanks

Thanks KM for contribution. I have modify the layout of your article for more readable.

Indeed, I had mention 2 similar articles month ago in my blog. I didn't post it on the front page coz it is not a full articles.

Wait to see your next article or question in DebianHK

Java Plugin

Hi.
Thank you so much-saved me a lot of grief!

Best Wishes.