Google Executive Chairman Eric Schmidt said in court on Tuesday that he could not recall being told in 2005 that the company needed a license from Sun Microsystems to use the Java programming language.

Schmidt was Oracle's final witness before Oracle rested its copyright case on Tuesday morning, and Google then called Schmidt as its first defense witness.

Schmidt did not leave the stand during the changeover, and his testimony was continuing.

Oracle sued Google in August 2010, saying Google's Android mobile operating system infringes its copyrights and patents for the Java programming language.

(Reporting By Dan Levine; Editing by Maureen Bavdek)