But the jury in U.S. District Court found that Google made "fair use," under copyright law, of Java elements that help different software programs work together.
Similar exemptions allow artists and critics to quote or reuse small portions of someone else's work in a larger essay or creation.
Oracle and its allies simply argued that the company should be paid for the use of its code.
Google co-founder Larry Page testified in person, while Oracle co-founder Larry Ellison appeared on video.
Google welcomed the jury's finding in its own statement.
You can follow Brandon Bailey at https://Twitter.com/BrandonBailey or find his reporting at http://www.bigstory.ap.org/journalist/brandon-bailey