A US jury has handed Google a major victory in a long-running copyright lawsuit, finding the search giant had the right to use Oracle's Java APIs in its Android operating system.

The jury unanimously upheld claims by Google that its use of 37 Java APIs was protected under the fair use provision of copyright law, bringing trlhe trial to a close without Oracle winning any of the US$9 billion (A$12.5 billion) in damages it requested.
In the retrial, Oracle had claimed Google's Android operating system violated its copyright on the APIs. Google said it should be able to use Java APIs under the fair use provisions of US copyright law.
The retrial, which lasted about two weeks, featured testimony from high profile executives including Alphabet executive chairman Eric Schmidt, chief executive Larry Page, and Oracle co-CEO Safra Catz.
In closing arguments earlier this week, a Google attorney said Oracle's real reason for filing the lawsuit was that it failed in its own attempts to enter the smartphone market.
But Oracle attorney Peter Bicks said it was Google that needed a quick way to build a viable smartphone operating system, and purposefully decided to use Java APIs without a licence as a shortcut.
Under US copyright law, "fair use" allows limited use of material without acquiring permission from the rights holder for purposes such as research. However, Oracle attorneys deemed Google's defences the "fair use excuse".
An earlier trial in 2012 ended in a deadlocked jury.
The trial was watched closely by software developers, who feared an Oracle victory could spur more software copyright lawsuits. However, investors saw little risk for Google's parent company, Alphabet.
Shares of Oracle and Alphabet were little-changed in after-hours trade following the verdict.
After the first trial, US district judge William Alsup ruled that the elements of Java at issue were not eligible for copyright protection at all.
However, a federal appeals court disagreed in 2014, ruling that APIs can be copyrighted.
In the two years since that federal appeals court ruling, however, a flood of copyright lawsuits against tech companies has not materialised. That could suggest Oracle's lawsuit might not ultimately have a wide impact on the sector as some had feared.