Google could have avoided all this mess, if they have done it cleanly together with Sun, or bothered to buy them afterwards.
There are quite a few commercial Java vendors with customized versions, like e.g. IS2T with MicroEJ that have licensing agreements in place.
http://www.microej.com/
If Google loses the trial, they will be paying much more than they would have spent.