License


J

John Leonard

I'm studying the JAXB API. The sample source code files provided by
Sun have the following inclusion:

/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the
GNU
* General Public License Version 2 only ("GPL") or the Common
Development
* and Distribution License("CDDL") (collectively, the "License").
You
* may not use this file except in compliance with the License. You
can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the
specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice
in each
* file and include the License file at glassfish/bootstrap/legal/
LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath"
exception
* as provided by Sun in the GPL Version 2 section of the License file
that
* accompanied this code. If applicable, add the following below the
License
* Header, with the fields enclosed by brackets [] replaced by your
own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the
CDDL or
* only the GPL Version 2, indicate your decision by adding
"[Contributor]
* elects to include this software in this distribution under the
[CDDL or GPL
* Version 2] license." If you don't indicate a single choice of
license, a
* recipient has the option to distribute your version of this file
under
* either the CDDL, the GPL Version 2 or to extend the choice of
license to
* its licensees as provided above. However, if you add GPL Version 2
code
* and therefore, elected the GPL Version 2 license, then the option
applies
* only if the new code is made subject to such option by the
copyright
* holder.
*/

What exactly does this mean to me as an application developer? I'm
only using the code as an example of the proper way to use JAXB. I
will cut, paste and refactor the code for use in my program. Does it
mean that the use of JAXB itself constitutes GPL'd activity unless
it's done in some other way? In adding this notice, did Sun intend
that every file where it appears, or did appear, must contain it? Or
is there some other use which it is specifically intended to restrict?

My background includes microcomputer app development going back to the
80's. I have become accustomed to having access to freely usable
sample code from manufacturers and the like to get things going when
developing for a given platform. Has that changed?

John Leonard
 
Ad

Advertisements

M

markspace

John said:
What exactly does this mean to me as an application developer?


It means you can't use this code.

I'm
only using the code as an example of the proper way to use JAXB. I
will cut, paste and refactor the code for use in my program.


Sun owns the resulting code if you do that. Also, if you remove the
copyright notice, you've violated the law.


I'd find at least two other examples of JAXB code, and use a combination
of all three patterns, but write the code yourself, copy nothing.
 
J

John Leonard

Sun owns the resulting code if you do that. Also, if you remove the
copyright notice, you've violated the law.

I am sure that the license does not transfer ownership to Sun.

John L
 
A

Arne Vajhøj

markspace said:
It means you can't use this code.


Sun owns the resulting code if you do that. Also, if you remove the
copyright notice, you've violated the law.

I'd find at least two other examples of JAXB code, and use a combination
of all three patterns, but write the code yourself, copy nothing.

If the code is modified and the modified code is used in app that
is distributed, then the modified source code must be made available.

This applies to both GPL and CDDL.

The more interesting question is the implications for the rest
of the source code if the app is distributed.

If GPL is used, then any code "linked" to that code
must be under GPL or it is violating the license.

If CDDL is used, then it can be used with both open source code
and closed source code. Open source includes practically
all licenses except GPL (CDDL is not GPL compatible).

Whether the code can be used and whether GPL or CDDL should
be used depends on the app. It may be fine for some.

And SUN does not get any special rights to either modifications
of this code or code linked to this code - they of course get the
same rights as everybody else according to the previous.

The above is a summary of the general understanding of GPL and CDDL
among programmers - if this involves serious business, then a lawyer
with expertise in licenses should be consulted.

Arne
 
M

markspace

John said:
I am sure that the license does not transfer ownership to Sun.


I think it does. Your modifications become a "derivative work" and the
rights to a derivative work stay with the original rights holder. That
would be Sun, as clearly stated at the very top of the comments block.

You still have the right to USE it under the license Sun granted you
(GPL/CDDL), but Sun OWNS it.

And I'm not a lawyer either, so caveat emptor. In short: do you really
want to bet the company that your GUESS is correct?
 
A

Arne Vajhøj

RedGrittyBrick said:
John said:
I am sure that the license does not transfer ownership to Sun.

But the source of any derivative work (your application) must be made
freely[1] available under the same licence (GPL).
>
Any user of your application has the legal right to demand the source
code from you.

But there is a big difference between GPL and CDDL:

GPL => source code off entire app
CDDL => only the source code that is copied/modified from this

And it is only if distributed outside your own organization.

Arne
 
Ad

Advertisements

A

Arne Vajhøj

markspace said:
I think it does. Your modifications become a "derivative work" and the
rights to a derivative work stay with the original rights holder. That
would be Sun, as clearly stated at the very top of the comments block.

Where do you read that?

Such a claim would be in violation of both GPL and CDDL. They
are based on that you retain copyright of your code, but that
your license for their code is only valid if you grant other
certain rights.

Arne
 
J

John Leonard

I think it does. Your modifications become a "derivative work" and the
rights to a derivative work stay with the original rights holder. That
would be Sun, as clearly stated at the very top of the comments block.

You still have the right to USE it under the license Sun granted you
(GPL/CDDL), but Sun OWNS it.

That is preposterous.
 
M

markspace

Arne said:
Where do you read that?


Such a claim would be in violation of both GPL and CDDL. They
are based on that you retain copyright of your code, but that


I read through the link provided and didn't see anything there that said
that. I know how the GPL is typically interpreted but I wouldn't bet on
it in a court. I think your interpretation is only applied if you are
the grantor, it doesn't affect the resulting work, which is not owned by
you.
 
J

John B. Matthews

Arne Vajhøj said:
If GPL is used, then any code "linked" to that code
must be under GPL or it is violating the license.

That is correct, but the example cited by the OP includes a specific
exception:

'Sun designates this particular file as subject to the "Classpath"
exception as provided by Sun in the License file that accompanied this
code.'

The exception is highlighted in yellow here:

<https://glassfish.dev.java.net/public/CDDL+GPL.html>

This would affect the OP's rights and obligations regarding
redistribution.

A similar exception is provided for runtime library elements that are
linked by various gcc compilers.
 
M

Mike Schilling

John Leonard wrote:
?
My background includes microcomputer app development going back to
the
80's. I have become accustomed to having access to freely usable
sample code from manufacturers and the like to get things going when
developing for a given platform. Has that changed?


It has, and I can't tell you why. Sun is iun the same position as
those manufacturers: they all want you to use their products, and
giving you some sample code as a starting point encourages that. Why
they'd make you jump through legal hoops to do so escapes me.
 
Ad

Advertisements

M

markspace

John said:
That is correct, but the example cited by the OP includes a specific
exception:

'Sun designates this particular file as subject to the "Classpath"
exception as provided by Sun in the License file that accompanied this
code.'


That's a good catch, I missed that. As long as the file is kept
separate and not mingled with other code, the Sun's copyright should be
limited to that one file.
 
L

Lew

markspace said:
It [the cited license] means you can't use this code.

Not really.

John said:
I am sure that the license does not transfer ownership to Sun.

If code is distributed under the GPL, then modifications to that code by all
future developers must also be released under the GPL. As others such as
Peter Duniho explained, this does not actually transfer ownership of the
copyright, it just limits the terms under which the new author can release
their work.

The license you cited gives you a choice of GPL or CDDL. The latter is less
restrictive.
 
M

markspace

Peter said:
The contradiction is counter-proof to your assertion.


I see I'm being out voted here. I still would not "cut, paste and
refactor the code for use in my program" as the OP suggests. That's
just asking for trouble.
 
M

Martin Gregorie

John Leonard wrote:
?


It has, and I can't tell you why. Sun is in the same position as those
manufacturers: they all want you to use their products, and giving you
some sample code as a starting point encourages that. Why they'd make
you jump through legal hoops to do so escapes me.

That doesn't apply to all Sun example code. For example, the code samples
in Appendix B of the JavaMail API Design Specification 1.4 have no
licensing agreements that I can find and the overall document licensing
doesn't appear to affect study, use or modification of this code.
 
J

John B. Matthews

"Peter Duniho said:
[...]
The exception is highlighted in yellow here:

<https://glassfish.dev.java.net/public/CDDL+GPL.html>

This would affect the OP's rights and obligations regarding
redistribution.

I don't think so. That exception provides only for the situation where
the original library is _linked_, without modification.

Modifying the library code itself excludes that exception, leaving the
rest of the license to apply in whole.

I'm uncertain. The exception says, "If you modify this library, you may
extend this exception to your version of the library, but you are not
obligated to do so." If I modify the library and extend the exception, I
am obligated to disclose the modification, but I can still rely on the
(extended) exception to link independent code that may remain
proprietary. It's a good question for the lawyers, I suppose.

This entails some risk, as either party may withdraw the exception from
future releases, leaving the other party on their own for maintenance.
Of course, the exception remains for existing versions. It's also a
reason why I somewhat prefer the Library General Public License.

As a practical matter, I routinely submit library bug fixes and
enhancements back to the original project. Among other things, it
greatly simplifies maintenance going forward.
 
Ad

Advertisements

J

John B. Matthews

markspace said:
That's a good catch, I missed that. As long as the file is kept
separate and not mingled with other code, the Sun's copyright should
be limited to that one file.

It's not carte blanche, but it's a common way to allow mixed licensing,
while encouraging contributions to the library.
 
J

John Leonard

(replying to my own message - as a follow-up)

If I use GPL'd code in a program, I must release the program under GPL
license as well.

Many (if not all) API samples provided by Sun carry some form of GPL
license.

If I use these API's, therefore, I must either:

Release what I develop under the GPL or
Devise my own means of accessing the API, which is probably hard to
do.

Sun provides these samples (I think) to make it easier to learn to
program the API's. In order to promote Java development. Are they
going to impose a condition that you can only use them if you publish
under the GPL?

I'm grateful to everyone who has responded to my question, even the
preposterous responses.

But, I believe that these notices are a mattress tag, i.e. a
threatening legal notice seen by the public but, in fact, only
intended for some.

I don't know who the intended audience of these notices might be.
Perhaps publishers who would include these files in a book or web site
without proper attribution.

But I don't believe that Sun is saying to the world, in effect, "If
you want to program any of these technologies, and you use the sample
code we provide in order to help you do it, then whatever you produce
must be licensed under the GPL."

John L
 
J

John Leonard

(replying to my own message - as a follow-up)

If I use GPL'd code in a program, I must release the program under GPL
license as well.

Many (if not all) API samples provided by Sun carry some form of GPL
license.

If I use these API's, therefore, I must either:

a) Release what I develop under the GPL or
b) Devise my own means of accessing the API, which is probably hard
to do.

Sun provides these samples (I think) to make it easier to learn to
program the API's. In order to promote Java development. Are they
going to impose a condition that you can only use them if you publish
under the GPL?

I'm grateful to everyone who has responded to my question, even the
preposterous responses.

But, I believe that these notices are a mattress tag, i.e. a
threatening legal notice seen by the public but, in fact, only
intended for some.

I don't know who the intended audience of these notices might be.
Perhaps publishers who would include these files in a book or web site
without proper attribution.

But I don't believe that Sun is saying to the world, in effect, "If
you want to program any of these technologies, and you use the sample
code we provide in order to help you do it, then whatever you produce
must also be licensed under the GPL."

If they were, what effect would that have on Commercial development,
for instance?

John L
 
Ad

Advertisements

L

Lew

The license you cited at the top of the thread had dual licensing - CDDL and
GPL with the classpath extension. It explicitly gives you the choice of using
either license or continuing the dual license scheme with your modifications.

Or use the CDDL license.

Peter said:
Why would it be hard to do? The sample code exists at least in part for
the specific purpose of illustrating how to use the API. You can take
advantage of the sample code without copying it verbatim.

Not based on the license terms that you cited, no.

Peter said:
It seems to me that if you copy-and-paste code Sun's applied that
license to, you're subject to the terms of the license. You don't have
to copy-and-paste the code in order to use it, nor in order to make use
of the API less hard (or even easy).

Peter said:
I don't understand the reference to "mattress tag". It's a common
misconception that one would be violating some law by removing the tag;
but the tags clearly state to whom the mattress tag does and does not
apply. The consumer is permitted to remove it, and the language on the
tag actually makes that clear. The only reason anyone thinks otherwise
is that they don't bother to read the whole thing.

Therein lies the similarity.
This software license isn't "a threatening legal notice...only intended
for some". It applies to anyone who is using the software in the way
that the license describes is applicable.

Other than both being legal notices, I fail to see the connection.

They are both legal notices that apply to redistributors that naive consumers
read and mistakenly think applies to them, causing them to overreact to the
erroneously-perceived legal threat in both cases.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top