This post originated from an RSS feed registered with Java Buzz
by Weiqi Gao.
Original Post: Sun Frees Its JDK
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
I'm travelling today. I'm in Seattle, Washington for a few days of whole day meetings. I didn't get a chance to surf the internet until 8:30pm local time.
The first thing I noticed is that I got a lot of hits on some of my old "Free Java" blog entries. "Hmm, did they really do it?" I thought. I checked Sun's Java web site, and sure enough, there it is—the announcement webcast, and more importantly, the source code, under the GNU GPL licance v.2:
#ifdef USE_PRAGMA_IDENT_SRC
#pragma ident "@(#)classLoader.cpp 1.180 06/11/08 09:15:10 JVM"
#endif
/*
* Copyright (c) 2006 Sun Microsystems, Inc. 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
#include "incls/_precompiled.incl"
#include "incls/_classLoader.cpp.incl"
// Entry points in zip.dll for loading zip/jar file entries
typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg);
typedef void (JNICALL *ZipClose_t)(jzfile *zip);
typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf);
typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
static ZipOpen_t ZipOpen = NULL;
static ZipClose_t ZipClose = NULL;
static FindEntry_t FindEntry = NULL;
static ReadEntry_t ReadEntry = NULL;
static ReadMappedEntry_t ReadMappedEntry = NULL;
static GetNextEntry_t GetNextEntry = NULL;
static canonicalize_fn_t CanonicalizeEntry = NULL;
So indeed, the Sun JDK will become dual licensed—under both the GPL and existing commercial licenses. This is the same licensing model of MySQL and Oracle Berkeley DB.
This makes the Sun JDK the third major free software/open source implementation of the Java programming language. The others are the GNU Gcj/GNU Classpath, found in Fedora Core and Debian Linux distributions for quite a few years, and the Apache Harmony, the Apache licensed Java implementation sponsored by IBM, Intel, BEA, etc.
I believe Sun's move ensured the long term survivability of the Java. And for that I thank Jonathan Schwartz and the Sun Java team. I also think amid all the festivities surround Sun, we shouldn't forget the people who worked on the alternative free software Java projects like gcj and GNU Classpath. It is them who forced Sun's turnaround on their licensing stance.
Back in May I wrote:
Me: ... I think Sun will open source Java. If not tomorrow, then within this year.
(If they don't, I'll give up Java altogether and become a Ruby-on-Rails fanatic.)
I'm really glad that I don't have to become a Ruby-on-Rails fanatic. Ruby the language seems to have hit some snag in the feature/schedule department for the new promised virtual machine.