22

Does Java license allow other companies to create their own versions of Java language or just implement it accurately? Same question about JVM.

I heard about Sun suing Microsoft for changing their .NET version of Java implementation and Java for Google Android, but I just can't grasp the whole concept as a totality.

Sergey
  • 531

3 Answers3

27

You can write a compiler that implements the Java Language Specification or write a JVM that implements the Java Virtual Machine specification, but when you officially want to call it "Java", you have to prove it is compatible by passing the tests of the TCK (technology compatibility kit) and pay for a license from Oracle.

Oracle doesn't make it easy for other parties to do this, though. Apache has their own implementation of the JVM (Apache Harmony) but previously Sun, now Oracle, is not cooperating in making the TCK available nor let Apache get a license, which has led to a lot of resentment between Apache and Oracle.

Long ago Microsoft had their own version of Java (that was indeed called "Java"). They tried to change it to make it Windows-specific, which Sun of course didn't like. There was a lawsuit, Microsoft lost, quit their own Java version and created .NET, which is a completely different thing that just happens to work a lot like how Java works...

The lawsuit about Android isn't based on this at all; Google isn't saying that Android is Java. That lawsuit is about patents; Oracle has patents on a number of ideas and concepts in their own JVM implementation and is claiming that Google is using the same patented ideas in Android without getting a patent license from Oracle.

Jesper
  • 2,599
3

Well, as I understand it, you can implement the specification all you like - to be able to legitimately call it "Java" you have to license and pass the compatibility kit, which apparently isn't trivial.

Android is not "java" although it uses the java language. It doesn't even attempt to pass the TCK.

1

The answers to this question are not correct. You are not free to develop software from the Java specifications, look at the license info in the appendix of specification papers: "License for the Distribution of Compliant Implementations". You are only able to make an implementation if and only if you:

  1. Fully implement the specification.
  2. Do not deviate from the specification in a manner they prohibit.
  3. Pass the TCK.

Furthermore, even if you do the above three things they even state it does not grant you any special privilege in regards to Java trademarks.

You are however, free to fork OpenJDK, the only restrictions for that being the GPL compliance. As what might be a point of confusion, TCK requirements are optional if you fork OpenJDK. See: OpenJDK Community TCK License Agreement (OCTLA)

Additionally before OpenJDK was a thing, some people were doing clean room implementations of Java as a way to get around copyright / licensing issues. This included projects like:

  • Kaffe
  • GCJ
  • Apache Harmony

This answer also assumes that the license on implementations from the specifications is enforceable. In the saga of Google LLC v. Oracle America, Inc. the topic of a language specification document and a language itself was conflated and didn't provide any clear guidance on the issue. In any case violating the license will not put you in good terms with Oracle.

Glorfindel
  • 3,167