Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ant and java 8 - "major version 52 is newer than 51, the highest major version supported by this compiler"

Tags:

java

eclipse

ant

I am trying to upgrade my ant project from java 7 to java 8.
(the project deployed in "Eclipse Kepler" with "Java™ 8 support to Eclipse Kepler SR2")

For that i downloaded ant 1.9.4 ( according this post http://wiki.eclipse.org/Ant/Java8) , and configure it's as my "ant home".

when i am trying to compile a got the following warning: "major version 52 is newer than 51, the highest major version supported by this compiler. [javac] It is recommended that the compiler be upgraded."

But the compiler that defined for the workspace is 1.8. (In the ant configuration it's define the compiler to be the same compiler of the work space..)

Any idea whats happened?

Thanks a lot.

Eyal

like image 230
Eyal leshem Avatar asked Jun 08 '14 12:06

Eyal leshem


1 Answers

Please check that the tools.jar used by Ant is from JDK8 and not JDK7.

Window -> Preferences:

In the left pane, go to Ant -> Runtime. In the Classpath tab, check the Global Entries.

like image 183
M A Avatar answered Sep 20 '22 19:09

M A