The issue, decided by the U.S. Court of Appeals for the Federal Circuit in Washington, is being closely watched by software developers in Silicon Valley.
Google's Android operating system is the world's best-selling smartphone platform. Oracle sued Google in 2010, claiming that Google had improperly incorporated parts of Java into Android.
A San Francisco federal judge had decided that Oracle could not claim copyright protection on parts of Java, but on Friday the three-judge Federal Circuit panel reversed that ruling.
The case examined whether computer language that connects programs - known as application programming interfaces, or APIs - can be copyrighted. At trial in San Francisco, Oracle claimed Google's Android trampled on its rights to the structure of 37 Java APIs. Oracle sought roughly $1 billion on its copyright claims.
U.S. District Judge William Alsup ruled that the Java APIs replicated by Google were not subject to copyright protection and were free for all to use. The Federal Circuit disagreed on Friday, ruled for Oracle and instructed the lower court to reinstate a jury's finding of infringement as to 37 Java API packages.
The unanimous Federal Circuit panel ordered further proceedings before Alsup to decide whether Google's actions were protected under fair use.
"We are mindful that the application of copyright law in the computer context is often a difficult task," Federal Circuit Judge Kathleen O'Malley wrote. "On this record, however, we find that the district court failed to distinguish between the threshold question of what is copyrightable - which presents a low bar - and the scope of conduct that constitutes infringing activity."
Neither Oracle nor Google was immediately available for comment.
The case in the U.S. Court of Appeals for the Federal Circuit is Oracle America Inc vs. Google Inc, 13-1021.