Sun Microsystems wanted $30 million to $50 million from Google for a Java license, but Google decided to build its own implementation for Android after negotiations broke down, Google Executive Chairman Eric Schmidt reportedly said during testimony in the Oracle/Google trial today.

Jurors were shown an e-mail exchange between Schmidt and Jonathan Schwartz, the two CEOs of Google and Sun at the time Google developed and released Android. The e-mails showed the companies discussing a potential partnership between Google and Sun. Google didn’t object to the amount of money Sun wanted, but it didn’t want to give up too much control over Android.

"We would have paid that," Schmidt said of the $30 million to $50 million, according to our sister site Wired.

Instead of taking a Java license, Google began developing Dalvik, a "clean room implementation" that would be compatible with Java without using its code.

"We began a clean room implementation. A clean room implementation is what was developed, and uses a completely different approach internally" than Java, Schmidt said, according to a liveblog of his testimony posted by The Verge.

Oracle, which now owns Sun, accuses Google of violating Java copyrights and patents, and is seeking tens of millions of dollars in damages plus future royalties from Android revenue. While Oracle has accused Google of copying source code, Schmidt said Android "implements the language and implements the APIs but does not use the Java source code."

Oracle spent part of its time questioning Schmidt by "hammering Schmidt on the fact that there was no documentation of Sun's approval," The Verge reports.

Although negotiations did not result in a deal, Schmidt said Sun publicly supported Android at the time of its launch and that Schwartz "orally" communicated to him that Sun did not oppose the way it was implemented.

"I was very comfortable with what we were doing was both legally correct given the licenses or lack of licenses at the time," Schmidt said.

Schmidt said Google did not need a license to use Java, because "in general languages are usable because ... languages are usually in the public domain or they've been released. Sun's goal was always to make it as available as possible."

Schmidt knows a bit about Sun, having worked for the company between 1983 and 1997. Judge William Alsup wondered why Google bothered making a clean room implementation if a Java license wasn’t even necessary. According to The Verge’s liveblog, Schmidt explained that Google needed its own implementation so it could make the Android source code public, allowing developers to find bugs.

The trial began in US District Court in San Francisco last week, and is expected to last eight weeks. This first phase is dealing with Oracle’s copyright accusations, while a second phase will deal with patents. Several big names in tech have already taken the stand, including Android founder Andy Rubin, Google CEO Larry Page, and Oracle CEO Larry Ellison. With the conclusion of Schmidt’s testimony, Oracle has rested its case in the copyright portion of the trial, Wired said.