Oracle Corp may use an internal Google Inc email Google fought to keep under wraps in a high stakes patent case over the Java programing language, a U.S. judge has ruled.

Oracle sued Google last year, alleging the Web search leader's Android mobile operating technology infringes Oracle's Java patents.

In addition to those patent claims, Oracle also leveled copyright infringement claims against Google. Oracle acquired the Java programing language through its purchase of Sun Microsystems in 2010.

Shortly before Oracle filed its lawsuit, a Google engineer drafted an email saying Google needs to negotiate a license for Java.

Google investigated alternatives to Java for Android and concluded they all suck, the email said. Google sought to prevent Oracle from using the email in its case.

But in an order on Thursday, U.S. District Judge William Alsup ruled that a magistrate judge got it right by finding the email was 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, Alsup wrote.

Google representatives did not immediately respond to a request for comment.

The case in U.S. District Court, Northern District of California, is Oracle America, Inc v. Google Inc, 10-3561.

(Reporting by Dan Levine; editing by Andre Grenon)