SAN FRANCISCO—Former Sun Microsystems CEO Jonathan Schwartz took the stand today in the second Oracle v. Google trial, testifying about how the Java language and APIs were used while he was at Sun's helm.

After a brief overview of his career path, Schwartz launched into a discussion about Java, a software language that Sun created and popularized. It's critical testimony in the Oracle v. Google lawsuit, in which Oracle claims that Google's use of Java APIs, now owned by Oracle, violates copyright law. Oracle is seeking up to $9 billion in damages.

Was the Java language, created by Sun Microsystems in the 1990s, "free and open to use," Google lawyer Robert Van Nest asked?

"Absolutely, yes," Schwartz said. "Since its inception. Long before I arrived at Sun."

Sun promoted use of Java in schools and colleges around the world, trying to grow a community of developers that would ultimately grow into the millions.

"It was in our interest to do so," Schwartz continued. "If you were using Java, then everything else that Sun sold, we could sell to you. If you were using Microsoft Windows, the dominant operating system, then we had nothing to sell you."

That freedom extended to use of Java APIs, as well. Schwartz explained APIs with a metaphor: two restaurants may sell something that their menus call a "hamburger." Even while they compete to sell the better burger, they reach an agreement on the menus.

"The strategy was, we agree on these open APIs, then we compete on implementations," he said.

The open strategy sometimes led to things Schwartz didn't like, like the GNU Classpath project, an open source Java product that Sun was forced to compete with.

"Did they take a license?" asked Van Nest.

"Absolutely not," Schwartz answered. "I was annoyed, but it was completely consistent with our practices. When you say APIs are open, there are competitive implementations."

Another competitive implementation of Java was Apache Harmony, supported by a coalition of companies including IBM, Oracle, and others.

"It wasn't going to call itself Java, so there was nothing we could do," Schwartz said. And, since Apache Harmony further promoted use of Java, Sun could still reap benefits, he noted.

No Java phone deal

While Schwartz was CEO, he had discussions with Google CEO Eric Schmidt (who testified yesterday) about a possible partnership in the mobile space.

"Sun was looking for Google to promote the brand—to endorse Java and endorse that logo," Schwartz said. "That would mean that a lot of other companies would want to pick up Sun products. It would make Sun more relevant in the marketplace."

The deal never worked out, though.

"I think it was a combination of money and technical independence," Schwartz testified. "Google didn’t want to rely on anyone else."

Sun also thought about creating its own Java-based smartphone, but that didn't happen either, Schwartz said.

"We had the foundational technologies to make it work, but we weren't able to get it to market in time," said Schwartz. "It's very difficult. We had R&D choices we had to make. We couldn't fund every project."

Van Nest asked: Did Sun's failure to make a Java-based smartphone have anything to do with Android?

"No," said Schwartz.

Van Nest passed the witness.

On cross-exam, blogs and blunders

Oracle's cross-examination was handled by Peter Bicks, who also grilled former Google CEO Eric Schmidt yesterday. Bicks peppered Schwartz with questions for the better part of an hour, often beginning his next question before Schwartz, no slow talker himself, had even finished his answer.

Bicks had a difficult task: to paint Schwartz as wrong about Java negotiations and deals that he was present for, and had just testified about. The first questions made sure the jury knew that the relationship between Schwartz and Oracle had soured.

Bicks: You didn't want to work for Oracle, did you? Schwartz: No, I did not. Bicks: Oracle didn’t offer you any senior management position, did they? Schwartz: No. I resigned. Bicks: Wasn't Oracle 'frustrated at your guidance?' [quoting an e-mail from Schwartz in evidence]. Schwartz: Oracle was frustrated with the speed at which customers began abandoning Sun, once it became clear we were going to be acquired.

Bicks then returned to another theme he'd brought up yesterday: that Schwartz and Google, the defenders of open source Android, conveniently ignored all the licensing and permission they required for their own products.

"Would it surprise you to know there was a specification license, between Sun and Apache?"

"No, it would not," Schwartz responded, utterly unfazed. He didn't know if such a license even existed, he said.

Bicks also tried to undermine Schwartz's blog post celebrating the launch of Android, which Schwartz had testified was his personal view, as well as an official statement representing Sun's view. Bicks pulled up Schwartz's e-mails to his associates suggesting Google might be "playing fast and loose" with licensing terms and another one trash-talking Android. That e-mail read, in relevant part:

Just as Google talking about Android with nothing to show didn’t hurt them. It got them into the dialog with Apple, long before they deserved to be, and to this day, even with a horrible product, it's Apple’s iPhone vs. Google’s Android (even though the latter is lame).

Bicks asked: Why weren't those negative assessments of Google and Android in his company blog post?

Schwartz shrugged it off. Android was lame, in his view, when he wrote that note—the mobile OS' earliest days. Other statements, like "fast and loose," were mere "speculation" that he wouldn't make in public.

"Many things I said internally didn't make it into the blog," he said.

Finally, Bicks pursued a line of questioning meant to undermine the view of Schwartz as a capable CEO. But it began with a technical mistake in Bicks' own question.

"You kept a Google blog on yourself, right?" asked Bicks.

"No," Schwartz said.

Bicks produced one of Schwartz's e-mails and gave it to him. It was a Google Blog alert.

"I think you've misinterpreted what this is," said Schwartz, after examining the document. "It's certainly not a Google blog. It's a set of alerts that Google looks for in blogs."

"But it looks like something you would receive?" Bicks asked.

"It looks like a lot of the spam I received, yes," Schwartz answered.

The blog alert e-mail pointed to a bunch of articles about Schwartz, including a 2008 blog by Glassdoor naming the 10 least popular CEOs. Schwartz was on the list, with a 50 percent disapproval rating.

"You were one of the bottom ten CEOs in the country, according to the employees," Bicks pointed out. He also pointed to a 2010 article naming Schwartz as one of the 15 Worst CEOs in American History.

"In the midst of the greatest recession of my lifetime, a lot of people were upset," Schwartz said. "I was upset, too."

Had he even seen the Glassdoor article, Bicks asked? Was Schwartz really going to disavow an article about him, in his own e-mail, keyed to a Google Alert he had apparently set? The question was just one more chance for Schwartz to get in another zinger.

"You know, there’s a lot of stuff on Google I don’t control," said Schwartz. "It’s a pretty big Internet."

That led to some laughter in the gallery. The ten jurors watched silently, poker-faced.