Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ant File Problem in Eclipse

807591May 6 2008 — edited May 7 2008
Hey guys,

I am having alot of trouble getting a simple ant buildfile to work in eclipse.

I am following the tutorial on here (the part about ant files):
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-93_project_builder.htm

I have created a simple java project called HelloWorld and created a build file below in a package 'org':
 

<?xml version="1.0" encoding="UTF-8"?>

<project name="HelloWorld" default="Hello" basedir=".">
 <property name="HelloText" value="Hello"/>
    <target name="Hello">
		
        <echo>${HelloText}</echo>

    </target>

</project>
According to the tutorial, I should get an outline in Eclipse (i use 3.2), etc, etc however I only get problems:
- Whenever I save the file I get "Save Failed: org/apache/tools/ant/launch/AntMain"
- When I attempt to add the buildfile to the 'Ant' pane on the right, I get error:
"failed to parse ant build file"

If anyone has any advice on how to get a simple ant file like the one above working, it would be so much appreciated!

Thanks
Gerry
ant newbie
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2008
Added on May 6 2008
13 comments
652 views