Oracle's legal fight with Google over its use of Java in Android goes to a jury trial for the second time next week, and the stakes are even higher than when the two sides met in court four years ago.

Oracle wants a whopping $8.8 billion in damages from Google, much more than the first time around, making it one of the biggest copyright cases ever, and it's anyone's guess which way the jury will go.

[ Android is now ready for real usage in the enterprise. Read InfoWorld's in-depth guide on how to make Android a serious part of your business. | Get the best office apps for your Android device. ]

The timing is awkward for Google – its I/O conference comes smack in the middle of the trial -- and developers at that event should pay attention to the outcome. If Oracle wins, Google could be forced to make changes to the way people build apps for Android, or else swallow a royalty fee for continued use of Oracle's technology.

Barring a last-minute settlement, the four-week trial begins Monday, and we're likely to see a parade of Silicon Valley bigwigs called to the stand to testify, including Oracle Chairman Larry Ellison and Google CEO Larry Page. It's a complex case that's likely to stretch the jury's understanding -- Judge William Alsup has worried aloud that they won't be able to keep up.

The trial will be split into two parts. In the first, the jury will decide whether Google's use of Oracle's technology is protected by the doctrine of "fair use," which allows copying for some purposes. If it decides it was, Oracle walks away empty handed (though it's likely to appeal). If its use wasn't fair, the second half of the trial will be to calculate damages. Here's what you need to know to follow the trial, held at the federal district courthouse in San Francisco.

What's this dispute about?

When Google created Android 10 years ago, it decided to make Java the basis for its OS. The Java language is open source and free for anyone to use, but Google also used 37 carefully structured Java programming interfaces (APIs), including 7,000 lines of "declaring code," for which Sun held the copyright. Early on, Google tried to negotiate a license but couldn't reach a deal and went ahead with Java anyway. Sun never showed much interest in filing lawsuits, but soon after Oracle took control of the company, it pounced.

Haven't we been through this movie before?

Yes, but after a trial in 2012, the jury was split on the question of fair use. The new jury will be asked to decide whether Google's use of the APIs was fair and, if not, how much damages it should pay.

How does Oracle get to such a huge sum?

Oracle's "damages expert" calculates that Google made $40.6 billion in revenue from Android through the end of last year, mostly from mobile search ads but also from apps, digital media, and hardware. After deducting costs and estimating what proportion of Google's profit should be attributed to Android itself -- as opposed to other Google technologies like its search engine -- he comes up with the figure of $8.8 billion.

Hang on, aren't those 37 APIs only a tiny portion of Android?

That's a big part of what Google's lawyers will try to convince the jury. Oracle advances a legal theory of "commingling," which basically says the gains from the APIs are so wrapped up in the whole that they can't be separated out. Google will counter that the APIs are a tiny fraction of Android so Oracle's reward should be far less.

Just this week, Alsup dealt Oracle a setback. He said its expert can cite the $8.8 billion figure in court, but he can't tell the jury Oracle is entitled to the whole amount.

This case sounds complicated.

You haven't heard the half of it. As well as learning about APIs, virtual machines and declaring code, the jury will hear testimony about different software licenses and what they allow developers to do. They'll also need to understand fair use.

What is that anyway?

Under U.S. copyright law, exceptions are made for certain types of copying, commonly for things like satire, news reporting, research, and commentary, but there are other exceptions, too.

The jury will be asked to weigh four fair use factors, which the judge has described here. One of the most important is the "purpose and character of the work," including whether Google's use of the APIs was commercial, and whether it was "transformative" -- whether it turned them into something new and different. It's pretty clear that its use of Java was commercial, so Google will need to convince the jury that Android transformed the original copyright work into something different.

The original work is Java 2 Standard Edition -- the desktop version of Java -- but the copyright protection extends to derivative works, including Java 2 Micro Edition, the version for mobile.

One of Google's arguments will be that Java 2 ME was used mainly in feature phones, and that it never approached the capabilities of Android -- making Google's use transformative.

Also crucial is the fourth fair use factor -- the effect on "the potential market for or value of the copyrighted work." Oracle will tell the jury that Android destroyed any chance Java ME had of succeeding in smartphones. Google will respond that Sun failed because it never built a decent mobile OS.

Google will also argue that the APIs were functional -- that it needed them to make use of the Java language, which after all is open source. To the extent the jury agrees, that could sway them toward fair use.

Who are these so-called expert witnesses?

Good question. Each side hires experts to testify on their behalf, often academics and consultants. Alsup has been a bit disdainful of experts; he's aware they might just say whatever they're told to in order to earn their fees.

Alsup says the jury has a right to know how much each expert is being paid, and he might reveal that in court. Oracle's fair use expert, for instance, is getting $1,200 an hour. The jury decides how much weight they give to each expert, depending on things like how trustworthy they find them to be.

This doesn't sound very scientific.

It's not. The facts of the case are only part of what will determine the outcome. A lot rests on how convincing the testimony is. Other potential witnesses include Google Chairman Eric Schmidt, former Sun CEO Jonathan Schwartz, and Android creator Andy Rubin. They'll testify about topics such as why Google chose Java, and whether it believed it needed a license in the first place.

What else do I need to know?

Whatever the jury decides, it almost certainly won't be the end of the matter. The losing side is sure to file an appeal, and the case will drag on.

Who's likely to win?

That's hard to say. A jury has heard the facts in the case once already, and on fair use, they were split, nine jurors to three in Google's favor. Under California law, the verdict needs to be unanimous.

But this is a new trial, with a new jury, and Oracle has a different legal team running its show.

Tyler Ochoa, a professor at Santa Clara University School of Law, notes that in copyright trials, the conventional wisdom is that the plaintiff -- Oracle -- usually starts in the stronger position. It's easy for a jury to see when material has been copied, he says, and the onus is on the defendant to prove its use was fair.

But he also notes that in the San Francisco Bay Area, the jury is more likely to have at least one member who's got some understanding of tech, who could better follow the nuanced arguments and influence the rest of the jury.

Predicting a winner, he says, is a "fool's errand."