Latest Revision of the Debian/JAVA FAQ
I have added some new stuff to the FAQ and now looks fairly
complete. Since there have been at least two people volunteering for
adoption of the FAQ I might move the sources to the DDP's CVS area and let
anyone modify it.
Meanwhile the sources (sgml) and the html version can be found at
http://www.dat.etsit.upm.es/~jfs/debian/doc/debian-java
Best regards and thanks for your contributions
Javi
Debian Java FAQ.
----------------
Javier Fernández-Sanguino Peña <jfs@computer.org>
3 April 2000
-------------------------------------------------------------------------------
Abstract
--------
Answers to Frequently Asked Questions on Debian and Java. Any changes
to this FAQ are appreciated, please send them to the current
maintainer.
Copyright Notice
----------------
Copyright (C) 1998,1999 Javier Fernández-Sanguino Peña, The current
FAQ has been made with tidbits of information from the debian-java
mailing list and made available freely to all interested.
-------------------------------------------------------------------------------
Contents
--------
1. Introduction
1.1. Introduction to this FAQ
1.2. What is java?
1.3. Why would I be interested in Java?
1.4. What is a JIT?
1.5. Where can I read more about Java?
1.6. Status of Java in Debian
2. Java development
2.1. What java development platforms are available in Debian?
2.2. What free platforms are there and how can I contribute?
2.3. Questions on commercial platforms and license concerns
3. Java Compilers
3.1. What Java compilers are available in Debian?
4. Java Virtual Machines (JVM)
4.1. What jvms work in Debian?
4.2. What free JVMs are available in Debian?
4.3. Are there known problems?
5. Java-related programs
5.1. What java related programs are available in Debian?
5.2. Making packages for Java progams.
5.3. Installer packages
6. Java servlets
6.1. How can I make Java servlets work?
6.2. Do servlets work with kaffe?
6.3. Do I need commercial Java in order to run servlets?
7. Java policy
7.1. Is there a Java policy for Debian?
7.2. Are there Holes in the Java Policy?
8. Running Java in Debian
8.1. Is there a way, using free software, to run a Java program
in Debian?
8.2. Other Java programs not yet available on Debian
-------------------------------------------------------------------------------
1. Introduction
---------------
1.1. Introduction to this FAQ
-----------------------------
This FAQ was started by Javier Fernández-Sanguino who on Feb 1st, 2000
was (bold?) enough to send a message to the debian-java mailing list
with the subject "How about a Debian-Java-FAQ?". Of course, since
"every idea is a responsability" he had to do this himself looking
through the three month-long archive of the newborn mailing list.
The purpose of this FAQ is to be a place to look for all kind of
question a developer or user might have regarding Java as far as
Debian is concerned, it includes license issues, development packages
available, and programs related to building a Free Software Java
environment.
Thanks go to all the (many) contributors from the debian-java mailing
list, who have made this document possible. Without their knowledge
this FAQ would not be at all possible since I only have a vague
knowledge of what they're talking about when I browse the list.
1.2. What is java?
------------------
Java is a strongly-typed platform-independant object-oriented
programming language often associated with the World Wide Web. Java
was developed by Sun Microsystems for embedded applications, but has
since grown to become a general-purpose programming language. Java
source code can either be compiled to a machine-independant byte-code
that can be run by java virtual machines, or it can be compiled
directly to executable code for any number of platforms, including
Linux, Win32, and others. A common API, shipped with all commercial
java development environments, provides socket support, a graphical
user interface widget set, graphical drawing tools, standard IO,
events, math, database interfaces, and multithreading, to name a few.
The multithreading support can happen either in kernel threads or user
threads, depending on the implementation of the java virtual machine
used.
1.3. Why would I be interested in Java?
---------------------------------------
TODO
1.4. What is a JIT?
-------------------
Acronym for Just In Time, A VM plugin to speed up VM execution by
compiling bytecode to native machine code.
1.5. Where can I read more about Java?
--------------------------------------
Of course, http://java.sun.com would be the first place to read
information on Java, right from the company who started it. However
good places for Java and Linux could be:
* Enterprise in a Nutshell by Gary Meyer, at
http://www.linuxdoc.org/HOWTO/Enterprise-Java-for-Linux-HOWTO.html.
Explains how to set up an environment including JDK, web server,
Java servlets, JDBC access to a database and EJBs. If you are
interested read also Java Enterprise in a Nutshell at
http://www.oreilly.com/catalog/jentnut/.
* The Linux Journal Magazine, the following articles might be worth
reading:
* Issue 66 Java servlets
(http://www.linuxjournal.com/lj-issues/issue66/3119.html)
and Java 2 SDK
(http://www.linuxjournal.com/lj-issues/issue66/3224.html).
* Issue 45
http://www.linuxdoc.org/LDP/LG/issue45/gibbs/Linux_java.html
* Issue 33 http://www.linuxdoc.org/LDP/LG/issue33/burtch.html
* Issue 32
http://www.linuxdoc.org/LDP/LG/issue32/rojansky.html
* Issue 25
http://www.linuxdoc.org/LDP/LG/issue29/hamilton.html
* Linux users worlwide includes information on how to use Java an
Linux http://linuxusers.webprovider.com.
* Linux Java Tips and Hints at http://www.parnasse.com/java.shtml.
* The Java and Linux Page
http://www.geocities.com/SiliconValley/Platform/8187/java/Linux_java.html
* The Java-CGI HOWTO from David H. Silber.
http://www.linuxdoc.org/HOWTO/Java-CGI-HOWTO.html. Explains how
to set up your server to run Java CGIs. Maybe it is worth
looking at servlets.
Other sites regarding Java would be:
* The Java Lobby http://www.javalobby.org.
* Brewing Java: a tutorial at
http://metalab.unc.edu/javafaq/javatutorial.html.
If you are browsing the web for free Java information try starting
with Open-Source Java (http://members.tripod.com/~mpTOOLS/ring.html) ,
if you are looking for applets with source code look at
http://javaboutique.internet.com/javasource.html. Check also Section
2.2, `What free platforms are there and how can I contribute?'
1.6. Status of Java in Debian
-----------------------------
The first thing you should understand about the design strategy of
Debian is that our goal is to produce a 100% Free software platform.
In that sense, some of these tools are not available in the standard
Debian distribution for licensing reasons as opposed to some technical
motivation.
That said, basically all of the technologies you might ask about can
be or are available for Debian immediately. In order to usefully
answer your questions, however, here you have a status from an Open
Source availability perspective.
If you are _really_ interested, read the following:
http://www.debian.org/Lists-Archives/debian-java-9912/msg00015.html
and
http://www.debian.org/Lists-Archives/debian-java-9910/msg00017.html.
This section is a summary of the information therein.
1.6.1. Java1 compiler (.java to .class)
---------------------------------------
There is the Kopi Java Compiler written in Java. And the super fast
Jikes written in C++.
Gcj can also compile .java to .class. CVS version currently does
handle inner classes, as well as any other jdk 1.1 constructs, but
might not be able to compile a complicated program like the XSL
processor xt. It is written in C, so is reasonably fast. It
generates reasonably good bytecode. And of course being able to use
the same compiler for .java to .class and .java to native has its
advantages.
1.6.2. Java1 JVM/JIT
--------------------
Kaffe 1.0.5 is largely feature complete and now includes support for
RMI. It is not clear as to whether Kaffe's serialization is "pin
compatible" with Sun's implementation in all cases so there may be
interoperation issues in some casses. Kaffe comes with a big class
library.
Japhar is also available.
libgcj (the run-time library for gcj) now includes an interpreter and
ClassLoader.
tya, a JIT compiler is also available.
1.6.3. Java1 native compiler
----------------------------
GCC, the Gnu Compiler Collection comes with GCJ, the Gnu Compiler for
Java
1.6.4. Java2 native compiler
----------------------------
It is unclear whether native compiler refers to the adaptive JIT
capabilities in Java2 or to a compiler that understands Java2
semantics. In either case, Kaffe's JIT strategy is not adaptive but
is still performant and becoming more so and it is believed IBM's
Jikes compiler understands Java2 concepts such as weak references.
1.6.5. Java2 foundation libraries
---------------------------------
Many of these components have been cloned under a Free Software
license. Kaffe provides many of these routines, including an
up-to-date RMI implementation. There are, however, definitely
shortcomings. Swing, as far as I know, has not been cloned.
1.6.6. Debugger (jdb equivalent)
--------------------------------
Debian has no debugger currently.
Gdb can debug code produced by Gcj. Stuart Grossman (Cygnus) also
wrote support for Gdb to debug other VMs using JVMDI. This has not
been released, because the Gdb internals were changed at the same
time, and no-one has had time to re-integrate the changes. We can
probably get Cygnus to release the old code, if someone wants to look
into getting this stuff working with the current Gdb internals. (A
non-trivial job.)
See http://sourceware.cygnus.com/java/gdb.html on how to debug
gcj-compiled Java programs.
1.6.6.1. What free edit-interactive/graphical debugging tools are available
on Debian?
----------------------------------------------------------------------------
jde, ddd, more?
1.6.6.2. Known problems
-----------------------
My version of `jdb' (jdb version 98/01/06) terminates after a program
finishes execution, and I have to reset every breakpoint if I want to
run through the program again. This makes using jdb extremely
frustrating. Jdb also can't (easily) print the values in an array
which is more than three elements long. Ddd lets me work around both
of these annoyances.
`ddd' 3.1 and earlier would "hang" when receiving certain prompts with
wierd thread names from jdb. This made it very hard to use ddd with
jdb. This has been fixed in ddd 3.2. It doesn't look like ddd 3.2
has been packaged yet. I suspect the current packaged version of ddd
won't work well with jdb.
1.6.7. Appletviewer tool
------------------------
There are some alternatives for an appletviewer tool:
* Blackdown's appletviewer (in jdk1.1).
* Kaffe's appletviewer.
* Ibm's appletviewer (in ibm-jdk).
1.6.8. Jar tool
---------------
`FastJar' which is indeed very fast.
1.6.9. Javadoc tool
-------------------
`doc++' can work with C++ and Java.
1.6.10. Enterprise Java Beans (EJB)
-----------------------------------
There is activity in this area, the most noteworthy being the Open
Source EJB implementation from Bull in France called Jonas. I have
done some work with this system and it provides a good start towards a
full EJB feature set. In particular, it provides a transaction
monitor and a container based persistance implementation. I have used
this system on Linux with free databases such as Postgresql. I have
not been able to get the system fully operational on Kaffe.
Additionally, the system depends on many Sun APIs which have not been
cloned (JTA, JNDI, and EJB itself).
1.6.11. JAIN
------------
It seems to be a system for controlling large scale, integrated
communications infrastructures and modeling events with such networks
via the JavaBeans API. The scale of this effort seems very large and
encompasses the work of many organizations. The work is very new and
seems to tie into Sun's SCSL strategy, which leads us me to believe
that there is not much in the way of Open Source options in this area.
However, some protocols such as H.323 are genuinely open and are even
cloned so it is possible that chunks of the JAIN system may exist in a
scattered manner. We have no knowledge of a serious Free Software
implementation of RTP or the H.323 infrastructures in Java.
1.6.12. Jini
------------
Jini presents an especially pronounced Free Software problem. Jini is
only available as source from Sun and that source is only available
under the SCSL. The SCSL is not compatible in any sense with either
the legal mechanics or the political spirit of Free Software. The
SCSL also makes cloning the API of an SCSL implementation illegal
which precludes even a clean room replication of Jini. If you are
interested in tuple space type implementations there are Open Source
options.
-------------------------------------------------------------------------------
2. Java development
-------------------
2.1. What java development platforms are available in Debian?
-------------------------------------------------------------
* Sun's jdk 1.1 (port made by Blackdown www.blackdown.org)
* `kaffe'.
* ibm's jdk (see Section 5.3.1, `What Java programs have an
installer?')
2.2. What free platforms are there and how can I contribute?
------------------------------------------------------------
Please help one of the Free Java implementations if you want to use
Java in Debian. There are a lot of projects that you can choose from:
* kaffe: http://www.kaffe.org or http://www.transvirtual.com.
* Japhar: http://www.japhar.org. The Java virtual machine of
"Hungry Programmer". More info in
http://www.hungry.com/products/japhar.
* gcj and libgcj: http://sourceware.cygnus.com/java/
* jikes: http://www.research.ibm.com/jikes/. A fast compiler
written in C++ (check also
http://www10.software.ibm.com/developerworks/opensource/jikes/).
(The new license seems to be finally really free)
* kopi: http://www.dms.at/kjc/.Yet Another Free Java Compiler, this
time written in Java, and GPL. Included in Kaffe since release
1.0.5.
* FastJar http://fastjar.sourceforge.net/, as a jar tool. (this
link seems to be broken, anyone?)
* Classpath http://www.gnu.org/software/classpath/ or
http://www.classpath.org. Most of the Standard classes for Java
1.2 (except Swing and RMI) are implemented by the ClassPath
project, it tries to build an alternative to jdk's 1.2 core
classes.
* Most of the RMI classes are implemented by NinjaRMI
http://www.cs.berkeley.edu/~mdw/proj/ninja/ninjarmi.html
* Autoconf macros
http://www.internatif.org/bortzmeyer/autoconf-Java/ helps easy
recompilation of Java programs.
* Mauve http://sourceware.cygnus.com/mauve/ is a free suite to test
if these tools are 'compliant'.
There is a list on free java at
http://www.lists.deus.net/mailman/listinfo/free-java, also look
http://www.gnu.org/software/java/ for information about Free Java.
2.3. Questions on commercial platforms and license concerns
-----------------------------------------------------------
2.3.1. JDK1.2
-------------
2.3.1.1. Why is Sun's jdk 1.2 not available?
--------------------------------------------
Due to license problems. Clause 2 of the license that comes with is
says:
Software is confidential and copyrighted. Title to Software and all
associated intellectual property rights is retained by Sun and/or its
licensors. Except as specifically authorized in any Supplemental License
Terms, you may not make copies of Software, other than a single copy of
Software for archival purposes.
2.3.1.2. What are the problems with Suns' new license?
------------------------------------------------------
Sun has moved to a new license the _Sun Community License_, like the
GPL it is a viral license, but making all it touches subject to Sun
licensing fee. The SCSL even goes so far as to define any
implementation of a Sun specification as a "Modified Work".
Basically, this means that if you implement any part of the new 1.2
API or Jini API, even from scratch, Sun will "own" your implementation
and you will have to pay them for the right to use it.
13. "Modification(s)" means (i) any change to Covered Code;
(ii) any new file or other representation of computer
program statements that contains any portion of Covered
Code; and/or (iii) any new Source Code implementing any
portion of the Specifications.
2.3.1.3. What is the SCSL?
--------------------------
The SCSL is the "Sun Community Software License" that can be found
http://java.sun.com/communitysource/. It is not compatible with Free
Software for several reasons, and agreeing to this license (e.g. by
downloading source covered by the SCSL) will make it impossible for
you to contribute to free software clean-room implementations.
According to Sun, this includes using documentation and API
specifications available only under SCSL.
To quote one open source developer, the SCSL is "about as free as the
former Soviet Union".
2.3.1.4. Can I use jdk1.2 while working with the free java implementations?
---------------------------------------------------------------------------
Clause 1 of the Supplemental License Terms says:
[You] may not create, or authorize your licensees to create
additional classes, interfaces, or subpackages that are contained in
the "java" or "sun" packages or similar as specified by Sun in any
class file naming convention;
Which seems to prevent one from making his own implementation of the
standard java classes using the JDK.
2.3.1.5. Why is (some) free software not implementing Java2?
------------------------------------------------------------
Sun has made public statements in connection with their legal strategy
in the Sun-Microsoft lawsuit that indicate that the company considers
the published specifications of Java2 to be intellectual property that
can not legally be used by persons involved in efforts to create Java2
clean-room implementations. For this reason, some open source
projects have decided to not implement Java2 any time soon. One
example is Kaffe. Some projects (like the Japhar/Classpath project)
have decided to challenge Sun's legal position and are going ahead
with Java2.
2.3.2. IBM's jdk1.1
-------------------
2.3.2.1. Can Debian distribute IBM's jdk1.1?
--------------------------------------------
It seems not. It has the following license:
Program Code
Consists of the IBM Developer Kit for Linux(R), Java(TM) Technology Edition,
Version 1.1.8, in Binary Code form, as modified by IBM to run on the RedHat(R)
6.0 Linux or Caldera(R) OpenLinux 2.2 Operating systems. The Program Code
consists of the Java virtual machine, the Java platform core classes and
supporting files (also known as the Java Runtime Environment or JRE) Java Tool
Kit, Documentation and Java Samples. Program Code may include soft copy
documentation, readme files, program data and such like.
You may only use the Program Code if you are a current licensee of Redhat 6.0
Linux or Caldera OpenLinux 2.2 Operating systems and the Program Code may only
be used in conjunction with such products.
See bug #54641 for an issue about IBM JDK. You can dowload it from
http://www.ibm.com/java/jdk/118/linux.
2.3.2.2. Is it possible to obtain a licence for Debian 2.1?
-----------------------------------------------------------
It would still be non-free, because of item 8 in the DFSG "License
Must Not Be Specific to Debian".
2.3.3. JRE
----------
2.3.3.1. Can Debian distribute JRE?
-----------------------------------
(from
http://www.debian.org/Lists-Archives/debian-java-9908/msg00021.html) I
don't think we can or want to distribute the JRE with Debian. The
supplemental license terms of the JRE has a few very nasty clauses:
1. License to Distribute. You are granted a royalty-free right to
reproduce and distribute the Software provided that you: (i)distribute
the Software complete and unmodified, only as part of, and for the
sole purpose of running, your Java applet or application ("Program")
into which the Software is incorporated;
We might get away with this one since we distribute it together with
Java applications bundled with Debian. But we also do want to allow
people to download only the jre package.
(ii) do not distribute additional software intended to replace any
component(s) of the Software;
But we cannot agree to this one. We want to distribute Kaffe, Japhar,
Classpath, Gcj, Kopi, Fastjar, etc which are intended to replace the
JRE with a Free version. Even if we don't consider non-free part of
Debian (the JRE would not go into main :) I think we should not
encourage software that tries to prevent Free replacements.
[...] (v) may not create, or authorize your licensees to create additional
classes, interfaces, or subpackages that are contained in the "java" or
"sun" packages or similar as specified by Sun in any class file naming
convention;
My example why this is a bad clause was not so good since someone
pointed out that you do not want to create something that is non
standard. I do agree that we want a standard implementation of the
core classes, but I also think that you should have the freedom to
create non-standard classes. (Or fix bugs or stupid mistakes in the
standard classes.)
[...] and(vii) agree to indemnify, hold harmless, and defend Sun and its
licensors from and against any claims or lawsuits, including attorneys'
fees, that arise or result from the use or distribution of the Program.
And I don't think that Debian (or SPI) can or wants to do that.
So I am afraid that we also cannot distribute the Sun or Blackdown
JRE. This isn't that bad since it is non-free software, but it is
annoying. As I said before please help one of the (many) Free Java
projects out there if you want to see a Free JVM, Standard Classes,
Compiler, etc. in Debian. They are far from complete but they do
work for most purposes
2.3.4. GPL or LGPL?
-------------------
Java uses dynamic linking at runtime. Using the reflection API and
class loading, the linking can be completely data driven, specifying
classes and methods by name. This moves the legal issues of using
GPL'ed Java code into the user's hands, as a violation of the GPL can
not be proven from the executable itself. Unlike plugins, Java
classes do not even have to have a specific structure to be used in
such ways. By using native methods and selecting DLL's at runtime,
this problem might also affect native code.
Example: a GPL'ed Java dependency checker using the reflection API.
Java's runtime linkage, in particular the reflection API, blurrs the
lines between code and data even more than e.g. native plugins.
If you want to write Java code that can be used without the user
having to worry about licensing issues, consider using the Lesser GPL
(LPGL). If you want to avoid seeing your classes and packages being
used by non-free software,
-------------------------------------------------------------------------------
3. Java Compilers
-----------------
3.1. What Java compilers are available in Debian?
-------------------------------------------------
* `guavac'. The compiler of Effective Edge Technologies. This
compiler is orphaned upstream, for real work use gcj or yikes.
* `tya'. A just in time compiler, used to compile java to byte
code.
* `yikes'.
* `bock'. Java to C compiler.
* `gcj'. Compiles Java source to native code, also source to
bytecode, or bytecode to native code.
* `gck'. Is this available?
* `kjc' is included in `kaffe' 1.0.5. There currently is no
separate package.
-------------------------------------------------------------------------------
4. Java Virtual Machines (JVM)
------------------------------
4.1. What jvms work in Debian?
------------------------------
Currently Sun's jdk and Ibm's jdk work in Debian. (But, for simple
programs such as the ones used for teaching, the free kaffe VM may be
enough. Another solution is to use gcj and to compile to native code,
thus solving the VM problem.)
4.2. What free JVMs are available in Debian?
--------------------------------------------
* `kaffe'. Cannot run all programs, although it is alleged to run
Jigsaw (a 10Mb distribution) see
http://www.de.debian.org/Lists-Archives/debian-java-9911/msg00038.html.
4.3. Are there known problems?
------------------------------
* Kaffe loops endlessly on the XML parsing.
-------------------------------------------------------------------------------
5. Java-related programs
------------------------
5.1. What java related programs are available in Debian?
--------------------------------------------------------
5.1.1. Deban 2.1 'slink'
------------------------
* `vrwave'. A Java VRML browser.
* `icq-java'. An installer for the ICQJava program.
* `jde'. A Java Development Enviroment for Emacs
http://sunsite.auc.dk/jde.
* `jlex'. A lexical analyser generator similar to the UNIX `lex'.
* `mmake'. A generator of Makefiles for java programs. More info
at http://www.tildeslash.com/mmake
* `libpgjava'. A java class that enables communication with the
PostgreSQL database using JDBC.
* `cup'. A parser similar to `yacc'.
* `ilu-javadev'. Development header and libraries for the
Inter-Language Unification System.
5.1.1.1. I've installed the latest jde package...what I have to do to let
Emacs enter jde-mode automatically when loading a Java source file?
----------------------------------------------------------------------------
As explained in /usr/doc/jde/README.Debian, all that is required is
putting `(require 'jde)' into your `~/.emacs' file.
Note that other add-on packages to Emacs are not enabled by default
either, e.g., AucTeX.
5.1.2. Debian 2.2 'potato'
--------------------------
* Libraries
* lib-fop-java
* lib-gnu.getopt-java
* lib-gnu.regexp-java
* lib-openxml-java
* lib-rxtx-java
* lib-sax-java
* lib-xp-java
* lib-xslp-java
* lib-xt-java
* lib-dom-java
* libpgjava
* libgcj0
* `bock' Bootstrap-only compiler kit for a subset of Java(tm)
* `doc++'. A documentation system for C/C++ and Java
* `fastjar' a complete replacement for the jar utility written in C
under the GPL http://www.engr.orst.edu/~burnsbr/fastjar/ (check
http://www.debian.org/Lists-Archives/debian-java-9908/msg00015.html
* `java2html'. Highlits Java sources for WWW presentations.
* `gcj' The GNU compiler for Java(TM).
* `global'.Source code search and browse.
* `guavac'. A java compiler.
* `jikes'. Fast Java compiler adhering to language and VM
specifications
* `jikes-pg'.Jikes Parser Generator.
* `oo-browser'.Object Oriented (X)Emacs Class Browser.
* `mmake'.Makefile generator for Java programs.
* `cocoon'. A XML/XSL publishing framework servlet
* `bsh' A Java scripting environment.
* `cup'. LALR parser generator for Java.
* `freetds-jdbc'. Pure Java JDBC driver for MS SQL and Sybase.
* `gnujsp'. A free implementation of Sun's Java Server Pages (JSP
1.0)
* `jlex'.A Lex-style lexical analyser generator for Java
* `jserv'Java Servlet 2.0 engine with an optional Apache module
* `tya'.JIT-compiler for Java.
* `ibm-jdk1.1-installer'. Installer for IBM Developer Kit for
Linux, Java(TM) Technology Edition. (see Section 5.3.1, `What
Java programs have an installer?').
* `jdk1.1'.JDK 1.1.x (Java Development Kit) - Runtime only
* `jdk1.1-dev' JDK 1.1.x (Java Development Kit)
* `biss-awt' a Java GUI application programming framework.
* `jdk1.1-native'.JDK 1.1.x Runtime - native threads extensions
* `jdk1.1-native-dev'. JDK 1.1.x - native threads extensions.
* `vrwave'.VRML 2.0 java-based browser
Also many editors (jed, elvis, vim, emacs, fte, xcoral,zed ....) have
support for Java syntax.
5.1.3. Is there a a free javadoc implementation?
------------------------------------------------
You might take a look at http://www.zib.de/Visual/software/doc++/, it
is package for Debian, in packages `doc++' and `doc++-doc'
(documentation).
5.2. Making packages for Java progams.
--------------------------------------
5.2.1. Can the package go to main?
----------------------------------
Since there is not yet a free java environment in Debian, the
dependance on any package to JDK avoids any Java program to be in
`main' even if it uses a free license, the program should be moved to
`contrib'. _But_ if you can sucessfully demonstrate that your program
can compile and work with free tools it can be moved to `main'.
5.2.2. What virtual packages could I use?
-----------------------------------------
* `java-common'. It is the Mother Of All Java Packages, in the
proposed policy. It contains the text of the Policy (Docbook),
as well as utilities scripts (for instance to build a CLASSPATH
from a list of jars (submissions welcome).
* `java-virtual-machine'
* `java-compiler'
* `java-compiler-dummy'.It is a small tool useful for the
transition to the new Policy. Until all compilers comply with
the Policy, java-compiler-dummy provides the following services:
* Provides: java-compiler so upper packages are happy,
* set CLASSPATH before calling the real compiler.
* `java-virtual-machine-dummy'.It is a small tool useful for the
transition to the new Policy. Until all virtual machines comply
with the Policy, java-virtual-machine-dummy provides the
following services:
* Provides: java-virtual-machine so upper packages are happy,
* set CLASSPATH before calling the real VM.
5.3. Installer packages
-----------------------
5.3.1. What Java programs have an installer?
--------------------------------------------
* `vajava' is a visual IDE for Java. You can find it in
http://software.ibm.com/ad/vajava._TODO: check copyright_. The
installer can be found at
http://www.dat.etsit.upm.es/~jfs/debian/vajava.
* `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 Section 2.3.2, `IBM's jdk1.1')
* `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.
5.3.2. What Java programs could I develop an installer to?
----------------------------------------------------------
* `jdk-1.2.2' SE Standard Edition
http://www.javasoft.com/products/jdk/1.2/download-linux.html.
* Blackdown's `jdk-1.2.2'
* `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.
-------------------------------------------------------------------------------
6. Java servlets
----------------
6.1. How can I make Java servlets work?
---------------------------------------
You can use:
* GNUJSP
* Apache Jserv. http://java.apache.org/jserv/index.html.
Also others not yet packaged for Debian but which migh be soon
included are:
* tomcat from ://jakarta.apache.org/tomcat/.
* jigsaw from http://www.w3.org/Jigsaw/.
* Jetty http://mortbay.com/software/Jetty.html (tested successfully
on a potato machine)
6.2. Do servlets work with kaffe?
---------------------------------
The `servlet.jar' in Kaffe will not work. It is only a shell. There
is another LGPL implementation that was written by Paul and Mark
Wielaard. It is available at
http://www.euronet.nl/~pauls/java/servlet these will have (have been?)
added Apache JServ package so the user doesn't have to download Sun's
classes any longer.
6.3. Do I need commercial Java in order to run servlets?
--------------------------------------------------------
Not known. Possibly not, need to explain.
-------------------------------------------------------------------------------
7. Java policy
--------------
7.1. Is there a Java policy for Debian?
---------------------------------------
It is still in the works. The current policy addresses _some_ of the
problems. It has not been officially released. You can find it in
http://www.debian.org/~bortz/Java/policy.html.
7.2. Are there Holes in the Java Policy?
----------------------------------------
Yes, some until under discussion. Thus it is _very_ inconvenient to
use serveral compilers of virtual machines since there is not one
CLASSPATH setting for all.
-------------------------------------------------------------------------------
8. Running Java in Debian
-------------------------
8.1. Is there a way, using free software, to run a Java program in Debian?
--------------------------------------------------------------------------
Yes there is, since the problem currently now is the jvm you can try
to run applications without a jvm. How? Compiling to native code is
the solution.
8.1.1. How do I compile to native code?
---------------------------------------
You might be able to use `gcj' or `jikes' (both free programs), to
compile the program. And use `gcj' to convert bytecode to native
code. The entire sofwtare chain is free.
8.1.2. Are there any successes using this approach?
---------------------------------------------------
Most certainly, read in
http://www.debian.org/Lists-Archives/debian-java-9911/msg00044.html
how this was done for the XML parser `xp'.
ezili:~/infosystems/XML/Java> gcj --main=UnTag UnTag.java UnTagHandler.java
/usr/share/java/repository/org/xml/sax/helpers/*.class
/usr/share/java/repository/org/xml/sax/*.class /usr/share/java/repository/com/j
clark/xml/sax/*.class /usr/share/java/repository/com/jclark/xml/parse/*.class
/usr/share/java/repository/com/jclark/xml/tok/*.class
/usr/share/java/repository/com/jclark/util/*.class
/usr/share/java/repository/com/jclark/xml/parse/base/*.class
8.1.3. Are there any problems with this approach?
-------------------------------------------------
Yes there are also some problems.
`gcj' does not fully support JNI. Tom Tromey is responsible for the
JNI implementation. As of april 2000 it is missing one feature (you
can't currently compile a .class file that uses JNI functions to
implement its native methods), but Tom is working on this and hope to
have it completed "soon".
Lack of JNI affects use of Classpath (e.g. as an alternative to
libgcj) as well as small, standalone apps that replace AWT with some
really simple GUI (like using curses, e.g. for small installers). It
also affects projects which have native code for performance reasons.
At the moment, gcj basically forces a CNI port. The only alternative
we are aware of is TowerJ, which is good for commercial projects, but
does not offer anything to free software.
8.1.4. Does these work for architectures different than i386?
-------------------------------------------------------------
Possibly not, since libgcj does not build on sparc and no one has
tried this for arm.
8.2. Other Java programs not yet available on Debian
----------------------------------------------------
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:
* BlueJ. A development environment for Java with editor, compiler,
virtual machine and debugger. See http://bluej.monash.edu.au/
* Jacob (Java Commando Base): project maintainer and visualiser for
Java in Emacs. See http://home.pages.de/~kclee/clemens/jacob.
* Emacs in Java. See http://jemacs.sourceforge.net/.
* Netbeans developer, now called _Forte_. Based on the Javabeans
architecture. See http://www.netbeans.com.Sun recently announced
they would open-source it. See
http://www.sun.com/forte/tools4dotcom/opensource.html.
* AnyJ. Graphic environment to develop applications, applets and
servlets. More info in http://www.netcomputing.de.
* Free Builder. A Java IDE written in Java and distributed under
the GPL http://www.freebuilder.org.
* CodeGuide. http://www.omnicore.com. Free license for
non-commercial use (CHECK).
.
-------------------------------------------------------------------------------
Debian Java FAQ.
Javier Fernández-Sanguino Peña <jfs@computer.org>
3 April 2000
Reply to: