Quick Guide
If you are fairly confident and don't want to read the whole document the following summary should probably be enought to get java working on your system. Lines 1 and 3 are preformed as root line 2 as a standard user.
apt-get install java-package
fakeroot make-jpkg
dpkg -i
Step 1 - Get the SunJVM
You could go with other JVM's like Blackdown or Kaffe if you want. I am not saying they aren't worth looking at but if you are serious about developing with Java you basically have no choice but to go with the Sun JVM. They provide it for free (as long as you sign you life away) so you might as well use the best.
You can get the latest Sun JVM from here http://java.sun.com/
Step 2 - Install the Required Builder Package
Installing Java on Debian is not the simplest thing in the world but fortunatly there is a package that will do most of the work for you (assuming it works). That heaven sent package is java-pacakge which can be installed with:
apt-get -u install java-package
Make sure that your repository is fully upto date before installing this package or you might run into problems installing the latest JVM. You also need fakeroot if you don't have it.
Step 3 - Create the .deb Package File
You have to perform this step as a non-root user so I suggest using your own account. Create a temporary directory and copy the java .bin installer file into it. then run the command:
fakeroot make-jpkg jdk-1_5_0-linux-i586.bin
changing the name of the java .bin package if you need to. You may see a few warnings while the package is being created (and it takes some time to actually create it - about 2 minutes). If you see a message at the end saying the package was created then the warnings are not a problem. The message will probably look something like this:
The Debian package has been created in the current
directory. You can install the package as root (e.g.
dpkg -i sun-j2sdk1.5_1.5.0+update00_i386.deb).
Step 4 - Install the Java .deb Package
You need to be root to perform this step so swtich now. Then execute the following command:
dpkg -i sun-j2sdk1.5_1.5.0+update00_i386.deb
Of course you need to specify the correct package name if yours doesn't match mine. You can find out what the package name is from looking at the success message.
Step 5 - Check it Works
This should be the simplest step. Just execute the command:
java -version
as both root and another user to make sure everything is installed correctly. You should see output not a million miles different to that shown below.
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
No comments:
Post a Comment