Debian JRE Mini How-To


I didn’t know Sun Java JRE(Java Runtime Environment) has been added into Debian Unstable Repository. Today, when I wanted to upgrade my JRE(previous version was installed manually), I stumbled upon a package name “sun-java5-jre” in Synaptic. Whoa, immediately I read all the description and dependencies. Yes, this package is indeed the Sun Java JRE version packaged in .deb. It is a non-free package, so make sure your apt source list have included “non-free” section.

These are the packages you need to get in order to have a working JRE on your system(unstable).

  1. sun-java5-bin (1.5.0-08-1)
  2. sun-java5-jre (1.5.0-08-1)

You will need to answer to License Agreement during the installation. Just answer OK for it.

Well here comes my configuration steps. Please be informed that, I had previously installed a version of JRE manually, downloaded from java.com. I had also manually modified several environment variables and symlink in order to make java works with my browsers, and to make it executable in command line.

Here’s a few checking steps you should try before anything else.

  1. After installing the above packages, close all your running web browsers. Open again one browser window, and browse this page. Click on the big “Verify Installation” button, the page either will show your installed JRE version, or your browser will alert you for missing plugin. From here you will know if your java plugin has been enabled, or not. The JRE version shown on the page, should be same as your installed package above.
  2. type this code in your console.

    Codes:


    java -version

    if the version printed out is not same with the package version you’ve just installed, some manual works need to be done. If it is the same as your installed package, then congratulations. No more setting for you to do.

If any of the above checking steps fails you, try my configuration steps below.

  1. For Web Browser Plugin
    This setting will work for any mozilla web browser. In console, cd into /usr/lib/mozilla/plugins/ with ROOT access. Then input this code.(ALL IN ONE LINE)

    Codes:


    ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/plugin/i386
    /ns7-gcc29/libjavaplugin_oji.so

    This will make a java plugin symlink in mozilla plugin directory, firefox will have no trouble using it.
    Edited 10 Dec 2006: Above method will not work anymore. Please install sun-java5-plugin instead, or your mozilla will crash when loading java applet.

  2. For console executable
    This is important to me, as I need to run azureus as my Bit Torrent client. So when you need to run a Java application, it is crucial that the “java” command is pointed to the most updated JRE. What I did is editing /etc/profile

    Codes:


    PATH=”/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games”

    I’ve added /usr/local/bin for my personal use, added it in the first in PATH will make the system look in that location first whenever a command is typed. If that directory does not exist, simply mkdir /usr/local/bin to create one.

    Add a symlink with this code.(ALL IN ONE LINE, and with ROOT access)

    Codes:


    ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/bin/*
     /usr/local/bin

    This will add symlinks for whatever in /usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/bin/ into /usr/local/bin

You should now go through again the checking steps above, to verify everything is in place.

NOTE: This is my personal configurations since I’ve already manually installed JRE before, I do not guarantee this will also work for you. For those installing for the first time, please let me know if the installation does all the configuration for you or not.

Technorati , , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Reddit
  • YahooMyWeb
Ratings:
 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Text Link Ads


Related Post(s)

Leave a Reply