A U.S. judge rejected Oracle Corp's claim for billions of dollars in damages from Google Inc for infringing on Java patents, a day after warning both sides they had taken unreasonable positions in a patent battle over the Android mobile system.

But the judge on Friday gave Oracle a chance to come up with new figures, after saying in a testy hearing the day before that both technology giants were asking for the moon.

Oracle sued Google last year, claiming the Internet search company's Android software infringed on Java patents that it inherited through an acquisition of Sun Microsystems in 2010.

The case is part of a wider web of litigation among phone makers and software firms over who owns the patents used in smartphones and tablets: the fastest-growing but most heavily competitive segment of technology hardware, one that Apple jump-started with the iPhone and iPad.

Google cast Oracle's damages calculations as between $1.4 and $6.1 billion and had asked U.S. District Judge William Alsup to disallow them. Oracle had called for Google to pay $2.6 billion.

Alsup rejected Oracle's damages report in a written ruling on Friday, saying that Oracle had overreached in multiple ways.

He also left the door open for a potential change in the schedule.

If Oracle needs to postpone the October trial until it settles on which claims it truly believes are triable, then it should bring a prompt motion to do so, the judge added.

At the hearing on Thursday in a San Francisco federal courtroom, Alsup sharply questioned Oracle attorney Steven Holtzman about Oracle's damages estimate, noting that the expert who crafted it was paid $700 an hour by Oracle and came up with a figure topping $6 billion.

Google, which has maintained that Oracle deserves no damages, declined to comment on Friday's ruling. Oracle spokeswoman Deborah Hellinger declined to comment.

The case in U.S. District Court, Northern District of California, is Oracle America, Inc v. Google Inc, 10-3561.

(Reporting by Dan Levine; Editing by Gary Hill)