I started using Ant, that ships with Eclipse. It annoys me, that I get hundreds of warnings in the lines of:
[javac] warning: java\\io\\BufferedInputStr
Since my development environment should be based on Java 6 the only thing that helped for this problem was removing Java 7 at all
download and install newer version of JDK.
Windows - > Preference - > Java - > Installed JRE set newer version here
Major version 51 is Java 7 - looks like you're developing against a preview Java 7 API library but compiling with a Java 6 javac. Either make sure ant uses the Java 7 compiler, or use a Java 6 API library to compile against.
One additional thing you probably also need to do is to go under the JRE tab of the Edit Configuration window and select the JRE version.
Thanks, I figured it out.
For those whom it may concern, to make sure Ant uses the Java 7 compiler:
Preferences -> Ant -> Runtime -> Classpath -> Global Entries
Add External Jars and put your
It will look something like
Follow these steps:
C:/Program files/Javaand delete the previous JDK.
PATHEnvironment Variables with the new JDK.
If there is a broken link with a jar in previous JDK, Eclipse will notify you. I solved in this way the problem with
tools.jar ant reference, but it is a general way to find the solution.