This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant 1.7 compilation problem with Java 5 Features Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant 1.7 compilation problem with Java 5 Features" Watch "Ant 1.7 compilation problem with Java 5 Features" New topic
Author

Ant 1.7 compilation problem with Java 5 Features

Lisa Ray
Greenhorn

Joined: Mar 05, 2009
Posts: 22
Hi All,
I'm facing a strange issue while compiling an app which uses Java 5 annotations. I'm tried with JDK 5 and JDK 6 and Apacha Ant 1.7. I get the following error while executing ant either from Eclipse or command line.



My ANT_HOME is set to C:\Tools\apache-ant-1.7.1
JAVA_HOME is set to C:\Program Files\Java\jdk1.5.0_09

Further, I tried using the following options with the javac task:




Any help shall be highly appreciated.

Thanks
Lisa
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I don't think that has anything to do with compiling Java source files - the error message is comping from the attribute-compiler task, not from the javac task. Could you post the attribute-compiler task?


JBoss In Action
Lisa Ray
Greenhorn

Joined: Mar 05, 2009
Posts: 22
Hi Peter,
Thanks for posting.

JavaRanch rocks!

I had to make two changes to get it working:

1. Add qdox 1.6 JAR to ANT
2. Tweak the attribute compiler task:


Thanks
Lisa

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant 1.7 compilation problem with Java 5 Features