Can Java code EVER be GPLd, at all?

Jules Bean jmlb2 at hermes.cam.ac.uk
Sun Nov 14 15:39:35 UTC 1999


I wish I had more time to keep up-to-date with os-license-discuss..

I've pulled RMS into a CC (sorry Richard, I'm sure you love it when I pull
you onto a busy thread like this) - I'd appreciate his input if I have
said anything very stupid.

Let me seize a few titbits...

On Sat, 13 Nov 1999, Arandir wrote:

> On Sat, 13 Nov 1999, Justin Wells wrote:
> 
> 
> Remember that the first "freedom" of Free Software is "The freedom to run the
> program, for any purpose". 

Key point.  Everyone remember it :-) Free software's first purpose is
freedom of users. The 'copyleft' effect to further free software is a
secondary goal.

> 
> > Java links at runtime. Although often compiled against the actual source
> > code in the first place, none of the original source is actually copied 
> > into the new class. Just references to names. 
> 
> This is exactly the case with C programs that dynamically link to C libraries.
> Unless the library developer used inlines or certain macros, only the library
> API is ever used.

I suspect that the run-time/compile-time linking is a red herring. [Note
as an aside that java is not completely run-time linked (*)].

The real issue is the thorny problem of 'derived work'. Ignoring
'clickwrap' licenses [which, IMHO, are not free software], a copyright
license can only affect someone else's work to the extent that it is a
derived work of your work.

AFAIK, *no one knows* to what extent library linking creates a derived
work. It is a 'fuzzy' issue, which would be decided on a case-by-case
basis by a magistrate or a judge. To some extent, the author of the first
program can influence this decision - a phrase like 'I consider works of
the form XXX to be a derived works of this one' in the license text *will*
influence a judge. But, it won't rule the day, if the judge considers it
to unwarranted.

Compare for example, the informational paragraph in the GPL which points
out that whether or not program output consitutes a derived work of the
program depends on the nature of the program.

Conversely, if, as Linus does, the author says 'I *don't* consider binary
driver modules to be a derived work of the kernel' then the
judge/magistrate will certainly respect that.

Some examples:

1) 'A' is a shell script written in 'bash'.  I would be very suprised if a
judge considered this to be a derived work of 'bash'.

2) 'gmp' is a math library. 'primetools' is a very simple library which
uses 'gmp' to do all its work, and provides some utility routines to work
with large primes. Now this one, I would *guess*, would be considered a
derived work of 'gmp', and hence could be bound by license restrictions on
'gmp'.  I further *guess* that it would not make any difference if the
linking was runtime, linktime, static or dynamic. [**]

3) 'primetools2' can now be linked happily against either 'gmp' or 'hmp'.
In this case, it's pretty clear that it is a derivate work of neither.

The problem is, people on this list are searching for hard lines.  I see
arguments like 'but if that is true, then by logical extension, every
shell script is a derived work of bash'.  There are no hard lines.
'Derived work' is an important concept, but not one that can always be
perfectly delineated.

Now, I'm fairly sure I'm right in saying that there is very little legal
precedent on any of this.  The reason for this is basically that most
'laywer-powered' software distribution has centered around actually
physically distributing the libraries with the software, and in that case
there can be no doubt that you need to satisfy the copyright of the
library. Where it gets a little gray is in the dynamically-linked world
that, for example, most linux users live in - if I download someone's new
'readline-using' program I won't download readline, I already have it.

If anyone *does* know of any legal precedent for any of this, then I'd be
very interested in it.  In the meantime, the following is my guess on how
copyright law applies to libraries:

If an application 'A' uses a library 'B' in what might be described as an
'essential' way, then, irrespective of the physical mechanism of linkage
(static/dynamic/run-time/compile-time/corba) I would expect 'A' to be
considered as a derived work of 'A'.  Especially if 'A' is distributed
together with 'B', and especially if 'A' won't function without 'B'.

So, in the java example, if you GPL your java library, and a commercial
company distributes a java program using it, then I would expect the GPL
to apply - even though the technicalities of linking differ from the C
case.

If they contrive to construct their application such that your library
merely functions as a 'useful plug-in' (and the application functions
without it), and they don't distribute your library (but merely advise
users of its existence) I would expect them to be able to make the case
that their application is not derived from your library.

There are gray (or grey, where I come from) cases in between, and it's not
clear to me where the line will be drawn.

Yours, 

Jules Bean
[Not a lawyer, although I sometimes play one on mailing lists.  This
message is not legal advice]

* for example, java 1.0 at least would notice a non-inherited method and
generate a static method call.  This would then mean that if a new version
of the library class - with the *same* API - was installed, which overrode
that method, it wouldn't work with old code.  This happened with the java
1.0-1.1 AWT, for example.

** actually, binary distribution of statically linked binaries certainly
will invoke the library's copyright.  But that's a slightly separate issue
- certainly an important practical consideration for distributions of
binaries, like debian.

/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules at jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules at debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2 at hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/




More information about the License-discuss mailing list