The Common Development and Distribution License (CDDL) and GNU Public License v.2 w/Classpath Exception

The majority of the NetBeans IDE code is available under a dual license consisting of the Common Development and Distribution License (CDDL) v1.0 and the GNU General Public License (GPL) v2. NetBeans distributions include additional components under separate licenses identified in the License file. See the Third Party License file for external components included in NetBeans and their associated licenses.

Versions of NetBeans sources prior to the 5.5 release were made available under the terms of the Sun Public License. A discussion of the reasons for this change can be found here.

Both the CDDL and the earlier SPL are based on the Mozilla Public License (MPL); CDDL is a more reusable license, and was written to be more readable. Both have the same attributes:

  • Sources licensed under them may be reused in commercial products
  • Changes made directly in the sources - bug fixes or enhancements - must be contributed back to the, but new source files which you write that link to NetBeans code do not need to be

License Notices in Source Files

Source files on do not need to have the full text of the license in them; instead, just a header mentioning that they are covered under this license is required. The header should read (ignoring any necessary comment characters):

Copyright © 1997, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle and Java are registered trademarks of Oracle and/or its
affiliates. Other names may be trademarks of their respective owners.

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 or
nbbuild/licenses/CDDL-GPL-2-CP. 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
nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this particular file
as subject to the "Classpath" exception as provided by Oracle 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]"


The original software is NetBeans. The initial developer of the original
software was Sun Microsystems, Inc.; portions copyright 1997-2006 Sun
Microsystems, Inc. All rights reserved.

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 do not 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.

Oracle is not responsible for the availability of third-party Web sites
mentioned in this document. Oracle does not endorse and is not
responsible or liable for any content, advertising, products, or other
materials on or available from such sites or resources. Oracle will not be
responsible or liable for any damage or loss caused or alleged to be
caused by or in connection with use of or reliance on any such content,
goods, or services available on or through any such sites or resources.

More Information