Java

Google Beats Oracle in Java Ruling

At the heart of Oracle's lawsuit against Google over cloning 37 Java APIs lies one question: can APIs be copyrighted? To answer that question, one needs to understand the nature of APIs. Judge William Alsup, in ruling in favor of Google, used both analogy and Java code he wrote himself. Millions of Java programmers can sigh in relief.

At the heart of Oracle's lawsuit against Google over cloning 37 Java APIs lies one question: can APIs be copyrighted? To answer that question, one needs to understand the nature of APIs. Judge William Alsup, in ruling in favor of Google, used both analogy and Java code he wrote himself. Millions of Java programmers can sigh in relief.

If you want, you can peruse the judge's entire 41-page brief. The money quote comes early, on page three: “So long as the specific code used to implement a method is different, anyone is free under the Copyright Act to write his or her own code to carry out exactly the same function or specification of any methods used in the Java API.” But in Java, if you want to declare a method specifying the same functionality as another method, even if the implementation is different, the declaration or method header lines MUST be identical. And copyright law allows for this: “When there is only one way to express an idea or function, then everyone is free to do so and no one can monopolize that expression.”

Caleb Garling at Wired puts it even better, in a sort of metaphor. He said that Oracle argued that its Java API was like a beautiful painting or symphony. Google, on the other hand, compared the API to a file cabinet. Judge Alsup compared the Java APIs to the way that books are organized in a library: the books themselves may be copyrighted, but you can't copyright the way they're organized.

What does this mean? “Google did not infringe on Oracle's copyright when it cloned 37 Java APIs in building its Android mobile operating system,” Garling explained. The organization of the APIs may have been copied from Oracle, but Google brought its own code to the table. While this ruling may end the six-week trial that Oracle put in motion back in 2010 by suing Google, the story isn't over yet; Oracle says it will appeal. This is hardly surprising; Alsup's ruling entitles Oracle to practically nothing in damages.

Had Alsup ruled otherwise, it's not just Google that would have suffered. Garling notes that “In the software world, cloning APIs is a common practice.” It's no wonder when you consider their function. An API (short for application programming interface) lets two pieces of software communicate with each other. One practically needs to clone APIs to enable certain kinds of tasks to happen at all. The assumption throughout the software industry has been that one can't copyright an API. Alsup just made it official.

At least, he made it official in terms of Java APIs. Ed Walsh, an attorney with the Wolf Greenfield law firm, thinks that Alsup's ruling doesn't mean that all APIs can be freely cloned with no legal, copyright-related ramifications. He notes that Sun created Java and permitted Google to clone the APIs well before Oracle acquired Sun. Walsh thinks that “the view that Sun allowed people to use Java” was one element that influenced the ruling.

The way people used Java before Oracle acquired it surely seems to have a role in the situation going forward. Catherine Lacavera, Google's director of litigation, noted that the judge's ruling agreed with her company's understanding of how Java's APIs may be legally used. As she explained to Wired, Google believes “that these APIs were free for anyone to use as we did, taking just the declarations and doing our own independent implementations...That's the way developers use Java. You can't say a language is free for everyone to use and then hold back the nouns and the verbs.”

If you get the time, by the way, I recommend reading Judge Alsup's ruling, or at least skimming it. The first example of actual code written by the judge shows up on page 10, but the whole document shows an excellent grasp of exactly how the language works. On page 15 Alsup cites Baker vs. Seldon as a precedent, an 1879 Supreme Court case in which the judges ruled that accounting methods could not be copyrighted. He also cites many more modern cases, such as Apple vs. Microsoft in 1994. The concluding discussion starts on pages 33-34. The whole document may well teach you a few things about the Java language you didn't know before, and how many court rulings can make that claim?

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.