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
Click Add External Jars and put your tools.jar here.
It will look something like C:\Program Files\Java\jdk1.7.0_03\lib
Follow these steps:
C:/Program files/Java and delete the previous JDK.JAVA_HOME and PATH Environment 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.