[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Java SDK 1.5.0 and Debian



On Thu, 2005-01-27 at 19:28, Thórr wrote:
> Hi,
> i'm trying to install the java sdk 1.5 but i don't know how to
> proceed...
> while searching on google i found this topic:
> http://tinyurl.com/4hfbm
> 


YOu could try the following (this is from my notes which I slightly adapted from a previous posting on this list -- unfortunately I no longer remember where, sorry!

1) Download the J2SE JDK from sun
 Download the option under Linux Platform that says self-extracting file (the one whose filename ends in .bin), not the RPM one.

2) 2.1 Add deb sources for unstable

Add the following lines to your /etc/apt/sources.list file. You should already have similar entries for testing there.

# Unstable
deb http://ftp.us.debian.org/debian unstable main contrib non-free
deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

3) 2.2 Edit APT preferences file

Edit the /etc/apt/preferences file. If you don't have that file, just create a new one.

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600

Pay attention to the priority values. The higher number the higher priority.

4) 2.4 Run apt-get update
>apt-get update
to update the lists of the available packages. 


5) Install necessary packages

It is now time to install the packages that allows for the creation of the deb archive of the Java installation file. And also fakeroot if one wishes to create deb archive as a regular user. Execute

apt-get install java-package fakeroot

6) Create the Java deb package

Then create the deb package of the Sun's Java installer by using make-jpkg In this example the Java 1.5.0 JRE is used.
make-jpkg jre-1_5_0-linux-i586.bin   (Works better as root)

7)  If you are unsure, you can check your version of java-package by issuing the following command

apt-cache policy java-package | grep Installed

Note: VErsion 0.17 of java-package is minimum required.

8) Install the Java deb package

Install the just created deb package. Example:

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

Note: Name of JDK is sun-j2sdk1.5


9) Now install package with Debian-specific things that corresponds to the .deb created. Example:

apt-get install sun-j2sdk1.5debian


10) 
Some dependency problem error messages

If you get some error that says something about dependency problems during the above commands, ignore them for now and just proceed with both of the above commands.

And after both above commands, execute

apt-get -f install

that should solve any dependency issues left.

11) Setup path etc




Reply to: