JDK source code mismatch

I installed the latest version of JDK (1.7.0_21). When I look at the source code for the foundation class in Eclipse, for example java.lang.String, the license at the top of the file reads:

/*
 * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

This source code comes from a file src.zipthat ships with the JDK release.

When I look at the source code here: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/lang/String.java?av=f

... I see the GPL v2.0 license header.

/*
 * Copyright (c) 1994, 2010, 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.
 *
 * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

As I understand it, JDK 1.7 was released as a full open source licensed under GPL 2.0.

Can someone explain the license mismatch?

+5
source share
2 answers

OpenJDK released under GPL 2.0

OpenJDK

OpenJDK ?

GPL v2 , GPL v2 + , API.

Oracle OpenJDK?

. OpenJDK Oracle, , , GPL . Oracle .

Oracle JDK Oracle. FAQs

Java SE - Oracle (BCL) .

+3

. - OpenJDK 7, - Oracle JDK, OpenJDK.

+1

All Articles