Oracle CEO Larry Ellison took the stand in a San Francisco courtroom today to testify in the copyright infringement case between his company and Google, saying that developing software routines is one of the hardest things that Oracle does.

He was then visibly flustered under cross-examination by Google's lawyers, who pressed him on apparent contradictions in his testimony. They also aired a 2009 video of Ellison welcoming Google's Java contributions.

On cross-examination, Google came out firing and the room got tense quickly. "Do you understand that no one owns the Java programming language?" lead counsel Robert Van Nest asked.

Ellison began a longer answer, but Judge William Alsup interrupted him and said it was a "yes or no" question. Finally Ellison said, "I'm not sure."

"And anyone can use it without royalty?" Van Nest followed up.

"I'm not sure," Ellison said again.

Then Van Nest showed a video of Ellison receiving the same question on a deposition video and answering "That's correct" to both.

The two tech titans are fighting over Google's use of Java – which Oracle bought as part of its 2009 Sun Microsystems acquisition – in constructing the Android mobile operating system. During opening arguments Monday, Oracle said that Google violated Java patents and copyright with the Android virtual machine.

The core difference in the dispute so far has been how the two companies view an "application program interface" (API). Developers create software language APIs to give coders a standard way to communicate with other software and other parts of the computer. Google says they are an extension of the language itself and not copyrightable. Oracle considers them intellectual property and therefore copyrightable.

"Arguably, its the most difficult thing we do at Oracle," Ellison said when asked how hard it is to build an API.

Prior to Ellison's testimony, Oracle showed a video deposition of Google CEO Larry Page. Calculated and reserved in his answers, Page said that Java was a platform "among other things." When pressed he called the boundaries of the Java platform "blurry."

Ellison was also pressed on why Oracle manages the Java code so closely and makes sure that Java is always compatible "with itself." A big issue with open source software is that it "forks" or "fragments" when developers change it enough that one version doesn't work with another. "The big idea from Java was 'write once, run anywhere,'" Ellison said, reiterating Oracle's counsels' opening arguments that one of Java's biggest value propositions is its ability to easily update software. "Fundamental to that notion is that 'Java is Java,'" he said.

When asked if he was aware of any companies today that are using Java without taking one of the platform's three licenses, Ellison responded, "The only company I know about is Google."

Google's lawyers seemingly found other situations where Ellison changed his tune, for example on the nature of an Oracle and Google co-development project for Java. And in a video from a JavaOne conference in 2009, after seeing an Android phone shaken at him while on stage, Ellison says, "We can see lots of Java coming from our friends at Google." The idea apparently being to show that Ellison knew about and supported Google's development of Java.

Ellison did maintain that Oracle believed, after doing a detailed internal analysis and recognizing it didn't have the expertise, that it was not right for Oracle to enter the smartphone market. "We explored the idea of building a Java phone, and it was a bad idea," he said. The questioning seemed designed to paint the picture that Oracle had explored options for monetizing the smartphone market – in both software and hardware – and realized it had no options.

On re-examination by Oracle counsel, Ellison offered up a statement that seemed to run counter to Oracle's claim of Google infringing on Java. "I don't know if you can copyright a language," he said. "I don't know the answer to that."