GPL v3 and Java programs
Oct 13, 2012The GPL v3 includes this definition:
A “covered work” means either the unmodified Program or a work based on the Program.
and states that covered works are also covered under the GPL v3 (which is what makes it a viral license). But the big question is, what is work that is based on the program? The only clarification that I could find with regard this is from the FAQ:
If the program uses fork and exec to invoke plug-ins, then the plug-ins are separate programs, so the license for the main program makes no requirements for them. If the program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single program.
“fork and exec” is a unix term. Dynamic linking is a not a natural java concept. So how does that apply to a java program? I couldn’t find any good information about this (lots of opinion, but nothing reliable). So I sought clarification from the FSF around this. Here, reproduced in the spirit of free speech, is their response, from Joshua Gay, the licensing & compliance manager at FSF:
The latest version of Oracle’s Java ProcessBuilder class provides the functionality for you to make simple fork and exec function calls that can be run on most operating systems and that are equivalent to those you would expect to find on any UNIX-like operating systems. If your program uses only the simple fork and exec functionality provided by the ProcessBuilder class to invoke and communicate with a GPL covered work, then your program and the GPL covered program can most likely be considered separate programs; therefore, the GPL would make no requirements on your program.
Note the emphasis on simple. The ProcessBuilder class allows the calling program to pass variables to the invoked program. You could use this functionality to “share data structures”, though presumably passing a file name reference wouldn’t qualify as “sharing data structures” between programs.
Context
I was interested in using some code covered by the GPL v3 in the FHIR build process (PlantUML, to automatically draw UML diagrams). But we could not take the risk that using GPL licensed code would create GPL based obligations for the build program and it’s source, because that includes the java reference implementation, and I didn’t want that to be covered under the GPL (it’s covered under a much more permissive licence that creates a different sort of freedom). However the question ended up being a moot question because the provider of PlantUML released a modified version that is licensed under LGPL, for which I am deeply appreciative.
Qualifiers
I am not a lawyer, and advice I got from a lawyer isn’t legal advice to you either.
From a legal sense, the GPL is probably to be understood as a contract between the user of some software, and the provider of the software. There is very little case law around the world with regard to how this kind of contract would be understood by the courts. Note that the definition of “covered work” as provided at the top would be interpreted by the court, and it would be at the discretion of the court whether to give weight to any advice such as that provided above. Add to this the breadth of variation in understanding contract and IP law around the world, and the situation is very unclear to me. (I recommend Heather Meeker’s “The open source alternative: Understanding risks and leveraging opportunities” for interested parties)
Still, the opinion here has value for me, because it’s not so much the actual legal position that matters, as of people’s opinions (perception is reality…). And here, the FSF’s opinion has real weight.