JavaPackageBuildNewVersions

Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2005-05-28 20:46:18
Size: 3311
Editor: adsl-213-190-44-43
Comment: imported from the old wiki
Revision 6 as of 2005-09-28 09:45:49
Size: 4517
Editor: m154
Comment: Corrections & precisions
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= JavaPackageBuild_1_5_0_01 = ## page was renamed from JavaPackageBuild15001
= HowTo build the Java package version 1.5.0 Update 4 =
'''by Markus Kolb <ubuntu-ml -at- tower-net.de>, Dec 26th 2004'''
'''edited by Seth Kinast, July 16 2005'''
Line 3: Line 6:
= HowTo build the Java package version 1.5.0 Update 1 =
'''by Markus Kolb <ubuntu-ml -at- tower-net.de>, Dec 26th 2004'''
'''edited by BasKok, Mar 1st 2005'''

The Ubuntu package java-package does not support the latest Java versions from Sun.
The Ubuntu package java-package (from Hoary) does not support the latest Java versions from Sun.
Line 12: Line 11:
First install Ubuntus packages fakeroot, java-package and java-common. First install Ubuntu's packages '''fakeroot''', '''java-package''' and '''java-common'''.
{{{
sudo aptitude install fakeroot
java-package java-common
}}}
Line 14: Line 16:
Note that java-package resides in the multiverse repository, see http://www.ubuntulinux.org/support/documentation/howto/helpcenterhowto.2004-10-20.3414506543/ for help on adding the multiverse repository to your apt sources. Note that [[Anchor(makejpkg)]] java-package resides in the multiverse repository, see http://www.ubuntu.com/support/documentation/faq/helpcenterfaq.2004-09-16.3469703387/talkback/1127809506/view for help on adding the multiverse repository to your apt sources.
or http://packages.debian.org/unstable/misc/java-package
Line 16: Line 19:
Goto http://java.sun.com/j2se/1.5.0/download.jsp and download the self-extracting Linux files. Go to http://java.sun.com/j2se/1.5.0/download.jsp and download the self-extracting Linux files (that end in '''.bin''').
Line 68: Line 71:
fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jdk-1_5_0_01-linux-i586.bin fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jdk-1_5_0_04-linux-i586.bin
Line 70: Line 73:
(If you got "make-jpkg: command not found", you forgived to install [#makejpkg java-package])
Line 74: Line 77:
fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jre-1_5_0_01-linux-i586.bin fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jre-1_5_0_04-linux-i586.bin
Line 79: Line 82:
'''Note: the build may fail with this error:'''
{{{
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory: done
}}}
This is due to a bug in '''dpkg-architecture''' on newer systems. Run '''dpkg-architecture''' and find the line similar to:
{{{
DEB_BUILD_GNU_TYPE=i486-linux-gnu
}}}
Next, run '''sudoedit /usr/share/java-package/sun-j2sdk.sh''' (or '''sun-j2re.sh''') and change line 6 from '''i386-linux''' to your architecture (most commonly '''i486-linux-gnu''').
Line 81: Line 97:
First install the sun-j2re1.5debian or sun-j2sdk1.5debian package with sudo apt-get install. The Debian/Ubuntu package has been created in the current directory. You can
install the package as root (e.g. '''sudo dpkg -i sun-j2sdk1.5_1.5.0+update04_i386.deb''').
Line 83: Line 100:
The Debian/Ubuntu package has been created in the current directory. You can
install the package as root (e.g. sudo dpkg -i sun-j2re1.5_1.5.0+r01_i386.deb).
----
'''Reinhard Tartler''' says:

You can also download newer versions of java package from http://packages.debian.org/java-package. Choose the version from the "unstable" distribution. This one should know the newest available jre/sdk's. If still such modifications as described above are necessary, please contact either the debian java team (preferably via the debian bug tracking system) or the ubuntu MOTU's.

---
'''Xavier Poinsard''' August 29 2005 :

An updated version of java-package is now available in breezy universe. It allows to build debs for newest JDKs.
Line 87: Line 111:
From ReinhardTartler Mon May 9 18:50:21 +0100 2005
From: Reinhard Tartler
Date: Mon, 09 May 2005 18:50:21 +0100
Subject: Updated Versions of java-package
Message-ID: <20050509185021+0100@https://www.ubuntulinux.org>
---
'''Daniel T Chen''' September 1 2005 :
Line 93: Line 114:
You can also download newer versions of java package from http://packages.debian.org/java-package. Choose the version from the "unstable" distribution. This one should know the newest available jre/sdk's. If still such modifications as described above are necessary, please contact either the debian java team (preferably via the debian bug tracking system) or the ubuntu MOTU's. Using Breezy's current java-package to create an IBM Java2 (1.4.2) JDK deb successfully symlinks the appropriate Web browser plugin but does not install the necessary dependencies, which are libxp6 and libgtk1.2. Please install these two additional packages if you plan to use an IBM Java2 JDK on Breezy.

HowTo build the Java package version 1.5.0 Update 4

by Markus Kolb <ubuntu-ml -at- tower-net.de>, Dec 26th 2004 edited by Seth Kinast, July 16 2005

The Ubuntu package java-package (from Hoary) does not support the latest Java versions from Sun. You have to change a few files in your editor. Here it is what you need and what you have to edit.

Needed packages for Java packagebuild and support

First install Ubuntu's packages fakeroot, java-package and java-common.

sudo aptitude install fakeroot java-package java-common

Note that Anchor(makejpkg) java-package resides in the multiverse repository, see http://www.ubuntu.com/support/documentation/faq/helpcenterfaq.2004-09-16.3469703387/talkback/1127809506/view for help on adding the multiverse repository to your apt sources. or http://packages.debian.org/unstable/misc/java-package

Go to http://java.sun.com/j2se/1.5.0/download.jsp and download the self-extracting Linux files (that end in .bin).

Changes to java-package files

Skip this step if you're running Ubuntu Hoary.

Change to the directory /usr/share/java-package/.

Look in the file sun-j2sdk.sh for the part with:

    "jdk-1_5_0-beta2-linux-i586.bin")
        j2se_version=1.5.0+beta2
        j2se_expected_min_size=122 # 125899 kB
        found=true
        ;;

Now add between this part and the "esac" following new lines:

    "jdk-1_5_0_"[0-9][0-9]"-linux-i586.bin")
        j2se_version="1.5.0+r${archive_name:10:2}"
        j2se_expected_min_size=131 # 
        found=true
        ;;

For the Java Runtime Environment you have to edit sun-j2re.sh.

Go now below the part

    "j2re-1_5_0-beta2-linux-i586.bin")
        j2se_version=1.5.0+beta2
        j2se_expected_min_size=81 # 83267 kB
        found=true
        ;;

and add in front of the "esac":

    "jre-1_5_0_"[0-9][0-9]"-linux-i586.bin")
        j2se_version="1.5.0+r${archive_name:10:2}"
        j2se_expected_min_size=84 # 
        found=true
        ;;

Package build

Please do not run the package build with real root rights because the Sun installer would install some not necessary files with absolute file paths in your system without package builder control!

fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jdk-1_5_0_04-linux-i586.bin

(If you got "make-jpkg: command not found", you forgived to install [#makejpkg java-package]) or

fakeroot make-jpkg --full-name "<Your name>" --email "<Your email>" jre-1_5_0_04-linux-i586.bin

and follow the instructions on screen.

Note: the build may fail with this error:

Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory: done

This is due to a bug in dpkg-architecture on newer systems. Run dpkg-architecture and find the line similar to:

DEB_BUILD_GNU_TYPE=i486-linux-gnu

Next, run sudoedit /usr/share/java-package/sun-j2sdk.sh (or sun-j2re.sh) and change line 6 from i386-linux to your architecture (most commonly i486-linux-gnu).

Package installation

The Debian/Ubuntu package has been created in the current directory. You can install the package as root (e.g. sudo dpkg -i sun-j2sdk1.5_1.5.0+update04_i386.deb).


Reinhard Tartler says:

You can also download newer versions of java package from http://packages.debian.org/java-package. Choose the version from the "unstable" distribution. This one should know the newest available jre/sdk's. If still such modifications as described above are necessary, please contact either the debian java team (preferably via the debian bug tracking system) or the ubuntu MOTU's.

--- Xavier Poinsard August 29 2005 :

An updated version of java-package is now available in breezy universe. It allows to build debs for newest JDKs.

--- Daniel T Chen September 1 2005 :

Using Breezy's current java-package to create an IBM Java2 (1.4.2) JDK deb successfully symlinks the appropriate Web browser plugin but does not install the necessary dependencies, which are libxp6 and libgtk1.2. Please install these two additional packages if you plan to use an IBM Java2 JDK on Breezy.

JavaPackageBuildNewVersions (last edited 2008-08-06 17:00:30 by localhost)