A U.S. court has ruled in favour of Google in the leagle battle it has been involved in with Oracle since 2012 over the use of the Java programming language in the Android operating system (OS). Oracle had filed the lawsuit against Google in 2010. Much like the trial in 2012, this time the jury on Thursday found Google not infringing upon copyright laws.

According to Oracle, which had gained ownership of Java during its acquisition of Sun Microsystems, Google has used the Java application program interface (API) to create the Android OS. Oracle argued that Google copied parts of the Java API and benefited at Oracle's expense.

Google, in response, said the Jave programming language was free and open to use.

At the end of the trial in 2012, the judge ruled that the structure of the code used by Java cannot be copyrightable.

Oracle turned to an appeals court in 2013 seeking to reverse the ruling. This time, the judicial system ruled in Oracle's favour, sending the case back to the district court to be reconsidered under fair-use provisions of U.S. copyright law. The judgment was reversed in 2014.

Google then floated a petition hoping that the Supreme Court would hear the case, but the petition was shot down by the U.S. Solicitor General.

On May 9, 2016, Oracle and Goolge met in a courtroom for a retrial, questioning whether Goolge's use of the Java API was fair use. Prior to the retrial, both companies met at a court-appointed settlement conference. Despite the meeting being attended by Google CEO Sundar Pichai and Oracle CEO Safra Catz, the parties involved failed to reach a settlement.

At the district court, Oracle demanded $9 billion from Google in damages. Both parties maintained their positions from the 2012 trial, and the jury on Thursday, May 26, unanimously ruled in favour of Google, upholding its claim that its use of the Java API was under the fair usage provision of copyright laws, Reuters reported.