Google successfully made its case to a jury last month that its use of Java APIs in Android was "fair use," and the verdict rejected Oracle's claim that the mobile system infringed its copyrights.

After Google argued its case, though, Oracle filed a motion arguing that the judge should decide as a matter of law that fair use didn't cover it. In the wake of the jury's pro-Google verdict, Oracle's motion was its last hope of a trial victory.

It didn't happen; US District Judge William Alsup shot down the motion on Wednesday. The same order also denied Google's motion making similar arguments, filed at the close of trial but before the jury's verdict.

Alsup's stinging order [PDF], which rejects Oracle's argument [PDF] on every front, hardly comes as a surprise. But the document provides the first insights as to what Oracle might bring up in an appeal proceeding, which the company has said it will pursue. In the order, Alsup defends how he ran the trial. The evidence and instructions presented to the jury were a mix of mandates from the appeals court, which overruled Alsup on the key issue of API copyrightability, and modifications urged by both sides' lawyers.

"The final jury charge culminated an exhaustive and iterative process of proposals by the judge followed by critiques by counsel," Alsup wrote.

He then goes on to dismantle Oracle's suggestion that its case was so strong that the jury's verdict should be disregarded.

"Oracle has portrayed the Java programming language as distinct from the Java API library, insisting that only the language itself was free for all to use," Alsup writes. He continues:

Turns out, however, that in order to write at all in the Java programming language, 62 classes (and some of their methods), spread across three packages within the Java API library, must be used. Otherwise, the language itself will fail. The 62 “necessary” classes are mixed with “unnecessary” ones in the Java API library and it takes experts to comb them out. As a result, Oracle has now stipulated before the jury that it was fair to use the 62 “necessary” classes given that the Java programming language itself was free and open to use without a license.

Oracle's argument boils down to saying that it was okay to use the language, and okay to use the 62 "necessary" classes, but that Google "should have scrambled the functionalities among a different taxonomy of packages and classes."

That would have required programmers to learn two different systems of "structure, sequence and organization," or SSO, the judge noted. The jury could reasonably have found that such a division "would have fomented confusion and error."

"By analogy, all typewriters use the same QWERTY keyboard—imagine the confusion and universal disservice if every typewriter maker had to scramble the keyboard," Alsup wrote.

The judge proceeds through the four-factor fair use analysis, in which Oracle argues that no reasonable jury could have sided with Google on any of the four points. As to the first factor, the nature of the use, it was Oracle that requested to bring forth evidence of Google's alleged bad faith, Alsup noted. Mental state is a "classic question reserved to the jury," and was hotly contested.

Alsup says the jury could have reasonably concluded that at least the declaring code and SSO were free to use. That evidence was backed up by Google testimony, as well as that of ex-Sun Microsystems CEO Jonathan Schwartz, who testified that everything Google did was standard industry practice.

"Oracle’s harsh cross-examination focused on character assassination and showing that Schwartz resented Oracle for its treatment of Schwartz after the buyout," writes Alsup. "That Oracle resorted to such impeachment underscores how fact-bound the issue was, another classic role of a jury to resolve."

It doesn't get any better for Oracle as the order goes on. As to factor two, the jury could have concluded that the "functional considerations" dominated the API design process. With regard to the amount of the work used, the jury could have reasonably concluded that Google's copying of a "tiny fraction of one percent" of the copyrighted works represented the "bare minimum... to preserve inter-system consistency in usage." Finally, the jury was reasonable to decide that Android "caused no harm" to the market for the copyrighted work, which was Java Standard Edition, built for use on desktop and laptop computers.

As for Java Mobile Edition, it was in decline "before Android was even released," and the jury could have determined Android had no negative impact "beyond the tailspin already predicted within Sun."

More from the Oracle v. Google trial: