Neil Civjan, Sun's head of global sales, told the district court in California on Wednesday that Sun enjoyed a windfall from licensing Java for the first smartphones, with there being 2.6 billion Java-enabled phones in use at the peak, constituting 85% of global mobile devices.
Google and Oracle have been in court since 2010, after the latter sued, claiming that Google had illegally used code from Java, a total of around 11,000 lines, in Android. The first trial went in favour of Google but Oracle obtained a crucial reversal of judgement on appeal, with the appeal court overturning an earlier judgement that APIs cannot be copyrighted.
Armed with this, Oracle has now returned to court, seeking damages which are said to be in the region of US$9 billion. To put this in context, Google's parent company, Alphabet, made a profit of US$4.9 billion in the last quarter.
Civjan said when Android was released, it was taken up very fast and Sun began to lose licensing revenue for Java.
Sun's former vice-president for client systems Alan Brenner also testified about the rise and fall of Java. Just before he quit his job in 2006, he estimated that Java was being used in four-fifths of the smartphones that were being made.
He also told the court about getting the US Trade Representative to force a South Korean institute to take a Java licence, when it came to light that the institute was going to make its own implementation of Java using the open source GNU Classpath.
Also testifying on Wednesday was an economist who predictably said the use of Java APIs by Google could not be considered to be fair use, the only defence that the search behemoth can claim if it wishes to avoid damages.
Adam Jaffe said it was unlikely that Android would have been as successful as it has, were it not for the 37 copied APIs.
On Wednesday, Oracle summoned a hostile witness to the stand, Stefano Mazzocchi being one of those who worked on the Apache Harmony program from which Google borrowed heavily when it was developing Android.
A number of emails sent by Mazzocchi were cited in court by Oracle lawyer Annette Hurst to try and show that he had doubts about whether it was kosher to use code from Java to develop Android.
Google and Oracle have been each given 900 minutes of trial time by the presiding judge, Justice William Alsup. As of Wednesday, Oracle had used 849 minutes while Google had used 775. The closing arguments are likely to start next Monday.