Java


NOTE:


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

Supported java binary distributions currently include:


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