If the Java packages provided in Debian are not sufficient for your needs you might need to take a look at other alternatives. Please understand that these alternatives are not supported by the Debian project directly, you might get help, however, from the debian-java mailing list if you encounter issues with them.
Some of the alternatives presented use Debian packages which is convenient, since the user/administrator does not need to care on installation issues. However, mixing packages that come from a source which is not the Debian project might cause conflicts with your installation some times. Of course, Debian tries to integrate as many free software efforts as possible, so some of the alternatives described below might (if license permits) be included in Debian in the near future.
If the releases provided aren't recent enough for you, you can of course install the files from the Blackdown mirrors. You can either use the Debian packages provided by Blackdown or download their tar files.
(contributed by Federico Mennite) If you want to use their packages, add the
following line [2] to your
/etc/apt/sources.list
:
deb proto://url/debian potato main non-free deb proto://url/debian woody main non-free deb proto://url/debian testing main non-free deb proto://url/debian unstable main non-free
Where proto://url is one of the mirrors from the list available at
http://www.blackdown.org/java-linux/mirrors.html
.
[3] For example, in Debian 3.0 using
Metalab's mirror use:
deb ftp://metalab.unc.edu/pub/linux/devel/lang/java/blackdown.org/debian woody main non-free
And then do:
$ apt-get update $ apt-get install j2sdk1.3
Note that, at the moment of this writting, there are only Blackdown packages for unstable of Java 1.4 and they are in beta release.
(contributed by Paul Reavis) If you download and install the JDK tar.gz files,
unpack them into /usr/local/jdk1.1.x
, and use symlinks to create a
/usr/local/jdk
and link in binaries to /usr/local/bin
or whatever. It is not at all difficult to install these. However, you can
get segfaults under some conditions depending on your libraries.
Here is a list of releases that are known to work under each Debian release, and what other software needed, if any, to make it happen.
(from Paul Reavis) [A quickie on getting Swing working under Debian or any Linux really]
Yes, it does work with the linux JDK; Swing is 100% Pure Java (tm)(c)(SFD) and therefore should run under any compliant JVM. Paul Reavis reported converting a commercial app (350+ classes) over to a fully-Swing GUI; I've had no problems so far.
If you are using jdk 1.1.3 or below, all you need are the class files. So, the easiest thing to do is grab the solaris distribution, in tar.Z format, from javasoft. Depending on phase of moon, they either call it swing or JFC 1.1 (to distinguish from 1.2, which is part of Java 1.2). The current version is Swing 1.0.2 (not to be confused with Java 1.0.2!). If you are using jdk 1.2.2 do not download Swing (it is already integrated in the jdk).
I don't have the archive handy here, so we'll pretend it's named swing.tar.Z. It is recommended you install it in /usr/local. So
skronk# cd /usr/local skronk# tar xzf /tmp/swing.tar.Z
Now you should have a /usr/local/swing directory. To test, make sure your JAVA_HOME variable is set, and CLASSPATH is unset, and run the "runnit" script in each example. To be painfully obvious, do this:
skronk$ cd /usr/local/swing/examples/SwingSet skronk$ echo $JAVA_HOME /usr/local/jdk skronk$ unset CLASSPATH skronk$ echo $CLASSPATH skronk$ ./runnit
Of course, your directories, shell prompt, and mileage will vary. To use with your own applications, just add the jars you want to your classpath.
If you wish to use Sun's or Blackdown's jdk 1.2 or later in Debian download the
packages provided by Blackdown (they are available in aptable directories) from
the different mirrors available in http://www.blackdown.org/java-linux/mirrors.html
(check the debian subdir). Currently there are i386 packages for the Java2 SDK
and RE, JAI, Java3D and JMF. This is the recommended mechanism for more
information read How can I get Debian packages from
BlackDown?, Section 11.1.
Or you can download the archives yourself (that is, the tar.gz, no the .deb package) and use the following mechanism:
/usr/local
(for example
/usr/local/sun
).
update-alternatives --install /usr/bin/javac javac /usr/local/sun/jdk1.X/bin/javac 120 update-alternatives --install /usr/bin/java Java /usr/local/sun/jdk1.X/bin/java 120
type javac type java
You should have now a fully working jdk 1.X environment, virtual machine and compiler included.
You might need to change your /etc/profile
adding the proper
definitions of some environment variables (CLASSPATH,
JAVA_COMPILER and JAVA_HOME) so that Java programs
can find the kit you just have installed. The following example show which
settings you could add if you had installed Sun's 1.2.2 jdk:
# JDK 1.2.2 (.tar) export CLASSPATH=.:/usr/local/sun/jdk1.2.2/lib:/usr/local/sun/jdk1.2.2/jre/lib export JAVA_COMPILER=javacomp export JAVA_HOME=/usr/local/sun/jdk1.2.2 export PATH=$PATH:/usr/local/sun/jdk1.2.2/bin
Note: As Juergen Kreileder correctly pointed me out The preferred name for versions >= 1.2 is Java 2 SE (Standard Edition). The jdk1.3 now is called "Java2 SDK v1.3" or "J2SDK 1.3". The jre1.3 now is called "Java2 RE v1.3" or "J2RE 1.3".
Warren Dodge explains how this can be done for Debian testing: the first step
is to download the J2SE SDK components from http://java.sun.com/j2se/downloads.html
into, e.g. /var/install/java/1.4.1
. Make sure that you have
write permission to the directory, and make the installer executable. Running
the installer ./j2sdk-1_4_1_02-linux-i586.bin
will create a
directory j2sdk1_4_1_02
which can be moved to
/usr/local/lib
. Next, create a link ln -s
/usr/local/lib/j2sdk1_4_1_02 /usr/local/lib/jdk which allows you to use
the latter location to refer to the Java environment and makes upgrading a lot
easier in the future.
Because Debian does not have an installer packages for Sun's J2SE, a dummy
package needs to be made to let Debian know that a J2SE is installed. This is
done as follows. Use the 'dummy' package control files provided by
java-common
to satisfy dependencies: cd /var/install/java
mkdir pkg cp /usr/share/doc/java-common/dummy-packages/*.control
/var/install/java/pkg equivs-build java-compiler-dummy.control equivs-build
java-virtual-machine-dummy.control equivs-build java-runtime-dummy.control
equivs-build java2-compiler-dummy.control equivs-build
java2-runtime-dummy.control You should now have five packages in
/var/install/java/pkg which should be installed.
The command update-alternatives
is used in Debian to choose which
of several pacakges to use when several can do the same thing.
("Java" can also be provided by kaffe, Blackdown (see above), etc).
See "man update-alternatives" for more details. Use this command to
install the programs you need with commands like: update-alternatives
--verbose --install /usr/bin/java java /usr/local/lib/jdk/bin/java 500 \
--slave /usr/share/man/man1/java.1 java.1
/usr/local/lib/jdk/man/man1/java.1
Run java once as root to allow system preference directories to be created and
to ceck if Sun's java
is working properly: java
-version
The procedure is as described for Debian Testing (above). However, the java-common in stable does not have the *.control files. Therefor, you need to install the java-common package from testing or unstable. Versions 0.19 and 0.20 can savely be installed and require the installation of the equivs package, but the one from stable is just fine.
The following are programs that have not yet been packaged for Debian nor is there an installer. There are quite a lot Java programs out there and this list is not an exhaustive list, it only includes programs that might be packaged for Debian or those that someone is working on an installer for:
http://bluej.monash.edu.au/
http://home.pages.de/~kclee/clemens/jacob
.
http://jemacs.sourceforge.net/
.
http://www.netbeans.com
.Sun recently
announced they would open-source it. See http://www.sun.com/forte/tools4dotcom/opensource.html
.
http://www.netcomputing.de
.
http://www.freebuilder.org
.
http://www.omnicore.com
. Non free
license, but no charges non-commercial use (CHECK).
.
vajava
is a visual IDE for Java. You can find it in http://software.ibm.com/ad/vajava
.TODO:
check copyright.
ibm-jdk1.1
. Installer for IBM Developer Kit for Linux, Java(TM)
Technology Edition. It will install an alpha version 1.1.6 of the IBM
Developer Kit. The IBM Developer Kit is a development environment for writing
applets and applications that conform to the Java 1.1 Core API. Its compiler
and other tools are run from a shell and have no GUI interface.
The IBM Developer Kit includes the IBM JIT (libjitc.so) which is used by all
tools by default. Look for it in http://master.debian.org/~doko
.
Needs to be upgraded to 1.1.8. However it seems that providing an installer
might break their license (see IBM's jdk1.1,
Section 5.3.2)
jdk1.2-installer
. Look for it in http://www.pobox.com/~julio/debian/jdk1.2-installer/
.
This one works for the pre-release version, a little work is needed in order to
install the release candidate version. (Update, April 2000, the link seems to
be broken, anyone has one?)
An important installer that is missing is an installer for Sun's J2SDK 1.4 series.
Some others are:
jdk-1.2.2
SE Standard Edition http://www.javasoft.com/products/jdk/1.2/download-linux.html
.
jbuilder3
. A Java IDE from Inprise (written in java) ftp://ftp.inprise.com/pub/jbuilder/jb3foundation/sol_linux/
.
Works well.
netbeans
. Another Java IDE (also written in java) http://www.netbeans.com/
for writing
bean based GUI apps.
Debian GNU/Linux Java FAQ.
$Revision: 1.33 $ 21 June 2004Sat, 7 Jun 2003 00:41:53 +0200jfs@computer.org