46

On November 13, 2006, Sun released much of Java as free and open source software, (FOSS), under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Java’s core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.

OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java programming language. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GNU General Public License (GNU GPL) with a linking exception.

  • Why there are still people who say that Java is not open source or free as in free speech?
  • Am I missing something?
  • Is Java still proprietary?
Tulains Córdova
  • 39,201
  • 12
  • 97
  • 154
  • 2
    related: [Is Java free software?](http://programmers.stackexchange.com/q/125833/31260) and [How does the maintenance of OpenJDK work in practice?](http://programmers.stackexchange.com/q/216203/31260) – gnat Dec 10 '13 at 18:10
  • I don't exactly know wheter only the Sun JVM implementation or even the technology (bytecode) is protected, but all the core libs (java.x.y) are free. So, if anyone creates a different bytecode specs and VM, should use the existing libs for free. Oops, Google did so with Dalvik! – ern0 Dec 10 '13 at 21:09

3 Answers3

48

The problem is that in order to call something "Java" you need to get it certified as compliant to the Java spec.

One of the pre-requisites of getting this certification is running you JVM through a test suite - Java Technology Compatibility Kit (TCK). This test suite is NOT open sourced.

So you can build a JVM that behaves in a very Java like way and be completely open source, but, if you want to call it a "Java JVM" you need to buy the certification suite under a non open source license. To many open source advocates this is a complete non starter.

Martijn Verburg
  • 22,006
  • 1
  • 49
  • 81
James Anderson
  • 18,049
  • 1
  • 42
  • 72
  • 7
    That's one of the reasons why [Apache Harmony (which was a fairly complete, independent JVM implementation) was stopped](https://en.wikipedia.org/wiki/Apache_Harmony#Difficulties_to_obtain_a_TCK_license_from_Sun). It's a shame really that Sun/Oracle acted this way (and still act this way). What Google did ("almost copy" Java) is probably a direct result of this as well. – Joachim Sauer Oct 24 '12 at 06:40
  • 1
    Also, the test suite is the Java Platform [TCK](https://en.wikipedia.org/wiki/Technology_Compatibility_Kit) (there are other TCKs for Java-related techologies as well). – Joachim Sauer Oct 24 '12 at 07:06
  • 5
    Also, if you build a successful JVM, Oracle [might sue you for copyright violation and patent violation](http://programmers.stackexchange.com/questions/71561/java-and-jvm-license). Like they sued Google over Android. – MarkJ Oct 24 '12 at 08:52
  • 2
    Is naming law relevant for calling something opensource? I can't create my own browser and call it firefox either. I think for the question the first thing is to understand it ... what is meant by the term "Java" the language spec, the jvm implementation, ... and who is calling it non-open ... – johannes Oct 24 '12 at 10:02
  • @johannes -- welcome to open source home of pedants and nitpickers! To many in the open source community these distinctions are important. Witness Apaches abandoning the Harmony project. To others of a more practical bent having a Java Like environment that works is "good enough" like the Dalvik VM at the heart of all Android devices. – James Anderson Oct 24 '12 at 10:35
  • @JamesAnderson well, many nitpickers are quite correct in what they are saying, but a less educated reader might not see the differences. So we should try to be precise and clear. – johannes Oct 24 '12 at 12:02
  • So the VM that gets installed when you install the JDK that is in the official Linux repositories is not OS ? – Tulains Córdova Oct 29 '12 at 00:10
  • @JamesAnderson Doesn't a GPL license make a project opensource and free ? Isn't being GPL enough? – Tulains Córdova Jun 13 '13 at 13:22
  • So what's google being sued over? – John Nov 12 '14 at 06:01
  • Google created a Java clone from scratch and released it under Apache License. Oracle claims it uses some Java source code. If it doesn't use Java source code, or the code it uses isn't copyrightable (APIs for example) then Google is fine. If Google did use Java source code, then they used it with out attribution, and changed the licensing of the code, which would be a copyright violation. – FigBug Jan 18 '15 at 14:32
  • Google essentially took the book of Java, copied the Table of Contents and the beginning and end of every chapter filled in the blanks and said "we don't think it's copyright" and decided to challenge something in court instead of legally licensing Java, because they refused to make a compatible JVM and oracle didn't like that. API's are historically copyrightable (as is most code), but it is fair use to copy an API for interoperability. Given that Android isn't interoperable with Java, they are trying to lift the copyright protection of API's\ – HaMMeReD Jun 06 '15 at 00:57
  • Now that Apple has announced they will open-source Swift, the pressure might be on Oracle to fully open-source Java. I mean... Oracle might wonder how many more legal fees Google will tolerate paying before it would be cheaper to migrate to Swift? Pressure. I may be wrong. – CommaToast Jun 08 '15 at 18:56
  • What seems to be forgotten is that the certification process that Sun introduced was to ensure we didn't get loads of incompatible versions of Java (remember Microsofts version) which was a laudable goal. – Paul Taylor Nov 14 '15 at 21:32
15

You should have read this answer before it was removed about which one to use. The main answer stated:

About Java 7, note that JDK7 and OpenJDK7 will have (nearly) identical code base.

Notice the nearly I highlighted.

From the article linked from that answer:

[…] but there is some code where there are open source replacements where we still use the old closed source code. This is primarily in font and graphics rasterization. The old closed source rasterisation code, while being encumbered, has had 10+ years of bug fixing and fine tuning etc and, for any open source replacement to displace that code in productized JDK builds, it would have to be provably as fast and stable and good quality as the existing closed code.

Also, from the Java FAQ:

The Java Development Kit (JDK) is free to download and use for commercial programming, but not to re-distribute.

So, not open source. Just nearly.

Also, even if it were completely open source, the development model and governance would not. That is not a licensing concern, though.

Gallaecio
  • 491
  • 2
  • 4
  • 2
    "free to download and use but not redistribute" means the software is "not free software", but it can still be "open source". Open source simply implies that you have access to the source code. Free software (as defined by the FSF and others) requires the right to redistribute as well. – user Oct 24 '12 at 09:19
  • 6
    @MichaelKjörling The OSI definition certainly requires redestribution rights. – luiscubal Oct 24 '12 at 14:37
1

In 1997, Sun Microsystems approached the ECMA to formalize the Java but it soon withdrew from the process. Java standard is actually controlled through Java Community Process.

Although in 2006, most of the Java was released by Sun Microsystems under the terms of GPL but the current official implementation is owned by the Oracle.

As Java lacks any formal standardization recognized by ECMA, ISO/IEC, ANSI, or other third-party standards organization, the Oracle implementation is the defacto standard. However, there are alternative implementations like GNU Compiler for Java, GNU Classpath, IcedTea-Web, etc.

  • 7
    -1: Since Java 7, the official reference implementation is the GPL's OpenJDK. – Michael Borgwardt Dec 10 '13 at 23:09
  • 3
    Talk about Java, you will get -1 :( OpenJDK is open source but implementation on Java.com is BCL, as mentioned above and [here](https://blogs.oracle.com/henrik/entry/moving_to_openjdk_as_the). _First, there is no change to our policy vs Apache Harmony. OCTLA is a program that allows free access to the TCK for OpenJDK-derived implementations licensed under GPL and is only intended for that purpose. Second, the Oracle implementation (what you find on java.com or java.oracle.com) will remain under the BCL license only. Finally, to be completely clear, the OpenJDK source code remains under GPL._ – Sajad Deyargaroo Dec 11 '13 at 10:52