Distributing a modified OpenJDK class with a proprietary app
https://softwareengineering.stackexchange.com/questions/290693
-
09-10-2020 - |
Pergunta
I want to distribute a Java class I borrowed from the GPLv2'ed OpenJDK and modified for my own needs as a part of my proprietary application.
The header at the top of the source file states (and I've preserved the same in the modified copy):
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*/
- Given that classpath exception is effective, would it be sufficient to distribute the modified
*.java
file packed alongside the corresponding*.class
file in a JAR archive? Am I obliged to explicitly mention that "this product uses software distributed under GPLv2" somewhere in theTHIRDPARTYLICENSEREADME.txt
file? - Alternatively, would it be sufficient to create a GPLv2'ed (with classpath exception) Maven artifact, deploy a binary artifact together with my product, and give the link to the source artifact in the
THIRDPARTYLICENSEREADME.txt
file? In either of the above cases, does it make any sense to additionally include something like
private static final String LICENSE = "This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation.";
in the source code, so that the license clause is additionally available in the binary class file(s)?
Solução
Either of your options is a valid way of complying with the license, but from a practical standpoint the second is preferable because it allows developers to work more easily with your modified code. As to including the license string in the binary, I'm not convinced I see the point - who's going to be looking for it there?