Differences between revisions 30 and 31
Revision 30 as of 2010-04-15 07:13:07
Size: 2808
Editor: GeoffSimmons
Comment: Add CategoryProposedDeletion.
Revision 31 as of 2012-02-02 16:47:52
Size: 3307
Editor: ?CédricPineau
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
'''NOTE''':
 *java-package 0.42 is obsolete and is no longer be available with Squeeze.
 *java-package 0.50 is a revamped version under developement in Sid and will hopefully be soon available in Wheezy.
Line 4: Line 7:
'''WARNING''': java-package is obsolete and will no longer be available with Squeeze.
 * Debian recommends the use of openjdk-6-jdk/openjdk-6-jre or openjdk-7-jdk/openjdk-7-jre which are prepackaged and available in all Debian flavours.
Line 7: Line 11:
JavaPackage is a utility for packaging a non-free Java&#8482; 2 Standard Edition (J2SE) Java&#8482; Runtime Environment ([[JRE]]) or Java&#8482; Development Kit (JDK) as a Debian package. JavaPackage provides the capability to create a Debian package from a Java&#8482; 2 distribution. Should your interest be more on the development with Java under Debian, then follow the [[Java]] link. To learn more about the packaging of Java-written programs and libraries for Debian, see [[Teams/JavaPackaging]]. JavaPackage provides the ability to build a Debian package from a Java binary distribution by running make-jpkg <java binary archive file> (with archive files downloaded from providers listed below).
Should your interest be more on the development with Java under Debian, then follow the [[Java]] link. To learn more about the packaging of Java-written programs and libraries for Debian, see [[Teams/JavaPackaging]].
Line 9: Line 14:
To prepare a .[[deb]] (regular Debian package) out of .bin files from Sun or Blackdown and .tar.gz files from IBM, or from the .zip files for Sun's API Javadoc, simply execute
{{{
$ fakeroot make-jpkg <filename>
}}}
The package includes the 'make-jpkg' command to do this.
Typical usage consists in
 *downloading one of the java binary archive listed below
 *invoking make-jpkg to build a Debian package from the downloaded archive
 *installing the generated package
Line 14: Line 20:
This program works currently with JREs and JDKs from [[Java/Sun|Sun]] (1.3 JRE, 1.4 and 1.5), and [[Java/IBM|IBM]] (1.3, 1.4 and 1.5 beta). It also works with the API Javadoc from Sun (1.3, 1.4 and 1.5). It should be pointed out, that with the advent of the openjdk package in the Debian main distribution, such packages are no longer of interest to the mainstream of the Debian userbase. Supported java binary distributions currently include:
 *Oracle (http://www.oracle.com/technetwork/java/javase/downloads) :
  *The J2SE Development Kit (JDK), version 6 (update >= 10), 7
  *The J2SE Runtime Environment (JRE), version 6 (update >= 10), 7
  *The J2SE API Javadoc, version 6 (update >= 10), 7
  (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!)

----
'''NOTE''': All other previously supported jvm (Blackdown, IBM, ..) have been removed and will only be added back on users demand.
----
Line 21: Line 37:
fakeroot make-jpkg jre-1_5_0-linux-i586.bin make-jpkg jdk-7u2-linux-x64.tar.gz
Line 23: Line 39:
dpkg -i sun-j2re1.5_1.5.0+final_i386.deb dpkg -i oracle-j2sdk1.7_1.7.0+update2_amd64.deb
Line 29: Line 45:
 * FakeRoot
Line 34: Line 49:
The Sun Java version as packaged by the java-package make-jpkg will produce a package with a quite high priority alternative.
Line 55: Line 69:
You may as well use the update-alternatives tool from java-common package which let you update all alternatives belonging to one runtime or development kit at a time.

{{{
sudo update-java-alternatives -l
sudo update-java-alternatives -s j2sdk1.7-oracle
}}}

Java


NOTE:

  • java-package 0.42 is obsolete and is no longer be available with Squeeze.
  • java-package 0.50 is a revamped version under developement in Sid and will hopefully be soon available in Wheezy.
  • Debian recommends the use of openjdk-6-jdk/openjdk-6-jre or openjdk-7-jdk/openjdk-7-jre which are prepackaged and available in all Debian flavours.


JavaPackage provides the ability to build a Debian package from a Java binary distribution by running make-jpkg <java binary archive file> (with archive files downloaded from providers listed below). Should your interest be more on the development with Java under Debian, then follow the Java link. To learn more about the packaging of Java-written programs and libraries for Debian, see Teams/JavaPackaging.

The package includes the 'make-jpkg' command to do this. Typical usage consists in

  • downloading one of the java binary archive listed below
  • invoking make-jpkg to build a Debian package from the downloaded archive
  • installing the generated package

Supported java binary distributions currently include:

  • Oracle (http://www.oracle.com/technetwork/java/javase/downloads) :

    • The J2SE Development Kit (JDK), version 6 (update >= 10), 7

    • The J2SE Runtime Environment (JRE), version 6 (update >= 10), 7

    • The J2SE API Javadoc, version 6 (update >= 10), 7 (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!)


NOTE: All other previously supported jvm (Blackdown, IBM, ..) have been removed and will only be added back on users demand.


Process

apt-get install java-package (see DebianPackageManagement, note that java-package is not in the main sources, you need to add contrib to your /etc/apt/sources.list ),

make-jpkg jdk-7u2-linux-x64.tar.gz

dpkg -i oracle-j2sdk1.7_1.7.0+update2_amd64.deb

See also:

Configuration

By default the DebianAlternatives will automatically install the best version of Java as the default version. If the symlinks have been manually set they will be preserved by the tools. The update-alternatives tools try hard to respect explicit configuration from the local admin. Local manual symlinks appear to be an explicit configuration. In order to reset the alternative symlinks to their default value use the --auto option.

sudo update-alternatives --auto java

If you'd like to override the default to perhaps use a specific version then use --config and manually select the desired version.

update-alternatives --display java
sudo update-alternatives --config java 

Choose the appropriate number for the desired alternative.

The appropriate java binary will automatically be in PATH by virtue of the /usr/bin/java alternative symlink.

You may as well use the update-alternatives tool from java-common package which let you update all alternatives belonging to one runtime or development kit at a time.

sudo update-java-alternatives -l
sudo update-java-alternatives -s j2sdk1.7-oracle


CategoryJava | CategoryProposedDeletion: Obsolete, removed from Debian to resolve bug 577423.