File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes java2se5 reuquired (Thinking in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "java2se5 reuquired (Thinking in Java" Watch "java2se5 reuquired (Thinking in Java" New topic

java2se5 reuquired (Thinking in Java

Leon Shlim

Joined: Feb 11, 2012
Posts: 1
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!!! )

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: java2se5 reuquired (Thinking in Java
It's not a secret anymore!