Last year, Oracle sued Google for patent infringement concerning the Android mobile operating system. Oracle claimed that Google had infringed on Java-related patents and copyrights, and Oracle had purchased the rights to Java in 2009 when it purchased Sun Microsystems for $5.6 billion.

Google said it had looked into using other programming languages for its Android mobile operating system, but they apparently didn't meet Google's standards.

"Java is essential for Android," said Al Hilwa, of research firm IDC. "Since Android has been out there for more than a year, most people would have expected they were in compliance with whatever license terms apply."

Not long before Oracle filed its lawsuit, Google had created an email saying that it needed to "negotiate a license for Java." Once the lawsuit erupted, Google fought to keep the email from being used by Oracle in the case.

But now, U.S. District Judge William Alsup ruled in an order on Thursday that the email is not protected by the attorney client privilege.

"Google has failed to identify any aspect of the challenged order that was clearly erroneous or contrary to law," said Alsup in the ruling.

While this doesn't look good for Google, Alsup already partially granted a request by Google to throw out Oracle's $2.6 billion in damages, saying that 90 percent of the Oracle patents were ruled invalid.

Reports have also noted that Google could drop parts of Java's J2SE code from the Android mobile operating system and avoid further Java-related issues with Oracle.