Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java2se5 reuquired (Thinking in Java

 
Leon Shlim
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ya'll!
I am pretty new here (alright, it's my first post... ;) ) and I was trying to run the following command in a *.class folder:
ant build
the error I get it: Build failed, J2SE5 required.

Now, I have set all my system variables correctly. java -version gives me: Java Version "1.7.0_02" and ant -version gives me Apache Ant(TM) version 1.8.02.

Now, my suspicion lies within the build.xml file itself, that it might be searching for an older version of Java. The error is given for line 59 in the build.xml and it's content is:


and in the beginning of the code I have this ( I don't know what to make of it...)




Thank you all for helping!!! )

Leon
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Leon!

Yup, I think you've nailed it. Easiest way to handle that is to just bump the version number to 1.7 in the "equals" element. If you have actual version dependencies, that can be adjusted in the javac tasks, but with luck you won't need to do that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic