[plug] Java and the GPL

Peter Wright pete at cygnus.uwa.edu.au
Sun Jun 18 18:36:19 WST 2000


On Sun, Jun 18, 2000 at 05:05:25PM +0000, Oliver White wrote:
> Petter Reinholdtsen wrote:
> > [Oliver White]
> > > I was thinking... is it legal to distribute Java applications
> > > under the GPL, since they will undoubtably link to the
> > > proprietary APIs of sun's JDK. I understand there's some leeway
> > > given to the standard libraries like libc, but the JDK is almost
> > > world - kitchen sink.
> >
> > You do not have to use SUN's JDK.  Kaffe (GPL) and Japhar (LGPL)
> > are GPL-compatible alternatives.  Kaffe more then Japhar at the
> > moment, but I'm sure this will change.  In addition you can use
> > the Java frontend to GCC and link with gcj to get a native binary
> > if you want.
> 
> Aha, but of course these *arn't* Java(TM). My question stands.

Lesstif is not Motif either, but quite a lot of GPL'ed applications
originally written to be linked with Motif (under the motif-is-a-
"standard"-library-distributed-with-commercial-unix-systems exception
allowed with GPL) will happily compile and run with Lesstif. GNU is
not UNIX either. :)

I believe that if you distributed a GPL'ed Java bytecode application
that was linked with Sun's JDK, that would technically be violating
the GPL in the same way as KDE is. However, if you distributed _just_
the Java (using the word "Java" in reference to the language, not to
Sun's development environment) source code, that would be fine. If you
distributed a Java bytecoded application that was linked to the GPL'ed
Kaffe libs, that would also be fine.

(both the "application" options above assume you are making the source
available as well, of course)

I think the general idea with a GPL'ed application is that if you get
it in binary form, you should be able to get hold of _all_ the source
code that is needed to recreate the app in binary form on your
particular system (with the significant exception of "standard"
libraries for your system, for which the source code does not have to
be available), under a GPL or LGPL license.

I think Petter was just trying to make the point that Java source code
by itself is fine, and to make a useful binary you do not _have_ to
use proprietary libraries - Kaffe is certainly a more-than-viable
alternative to the various proprietary Java environments available.

A similar situation applies with code based on Motif, or indeed KDE if
the Harmony project had not given up a year or two ago - it's only
wrong if you _distribute_ a binary which has been linked with
proprietary code (well it would be wrong for Motif-linked binaries
were it not for the exception). However, it's perfectly fine to link
GPL'ed code to whatever the hell you like on your own machine - as
long as you don't distribute the result. ;-)

> Oliver White

Pete.
-- 
http://cygnus.uwa.edu.au/~pete/

--
hundred-and-one symptoms of being an internet addict:
123. You ask the car dealer to install an extra cigarette lighter
     on your new car to power your notebook.




More information about the plug mailing list