views:

186

answers:

4

Is the source code for the Java shipped with Mac OS X available anywhere (official)? I know that the Sun implementation is GPL nowadays.

+4  A: 

No, it is not. While Sun has released the JVM under the GPL, they own the copyrights so they can (and do) license to other parties under other terms. Apple has been shipping the JVM (based on Sun's code) for over a decade, since well before it was GPLed, so they clearly originally licensed it under some other terms.

At some point in the future Sun (or Oracle) could opt not renew proprietary licenses, but that seems unlikely. It is actually a fairly common practice to make something available under the GPL and then grant an alternate license to some people (usually for a fee). You can look at licensing page of projects like Sphinx to see examples of this.

Louis Gerbarg
A: 

Do you mean the JVM or the Java Runtime Environment (like java.util.* for example)? If you mean the JVM then I don't know if you mean the second (the jre) then it is the same as the jre on any other platform, so the source code is available.

hhafez
A: 

No. The OpenJDK can be built on OS X, and the source for that is available.

Note, if you just want source code for classes in the JRE it is available as src.zip in your filesystem. Use Spotlight to find it.

Thorbjørn Ravn Andersen
A: 

The current Sun version of the JRE is not GPL. The JDK7 implementation has multiple licences including GPL. OpenJDK 6 (6-open) is a backport of the JDK7 implementation to JDK6. There is a port of OpenJDK 7 to Mac OS X. I am not a lawyer.

Tom Hawtin - tackline