This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse-Ant-Classpath trouble. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse-Ant-Classpath trouble." Watch "Eclipse-Ant-Classpath trouble." New topic
Author

Eclipse-Ant-Classpath trouble.

M�rten Sj�strand
Greenhorn

Joined: Sep 04, 2008
Posts: 2
Hi All,

When I launch an Ant task from the Ant view in Eclipse I get the error message:
Variable references non-existent resource : ${workspace_loc:/MY/FOLDER/myjar.jar}


In the external tool's classpath dialog the file ${workspace_loc:/MY/FOLDER/myjar.jar} is listed under "Additional Tasks and Support". A little confusing since my ant script is trying to build the file myjar.jar.

It's not possible to delete this classpath entry without deleting the whole Additional Tasks and Support tree.

I've tried clean up and refresh with out success, the only thing that seems to work is to rename an arbitrary jar to myjar.jar and rebuild. The rename-rebuild usually results a an build that doesn't contain the latest code changes.

Does any one know how the solve this confusing behaviour?

I'm using Eclipse 3.3.2, Ant 1.7, JDK 1.6.0_06 and Win XP.
M�rten Sj�strand
Greenhorn

Joined: Sep 04, 2008
Posts: 2
http://publib.boulder.ibm.com/infocenter/radhelp/v6r0m1/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-ant-classpath.htm

This gave me a hint on how to solve my issue.

Simply remove unused jar from Ants classpath under Windows->Preferences->Ant->Runtime->Classpath
redhuan oon
Greenhorn

Joined: Aug 31, 2011
Posts: 1
Thank you M�rten Sj�strand so very much. I have left this thorn in my Eclipse for so long and been running build from outside it until it gets too unbearable, and within few minutes found your answer here via google. I went to Preferences > Ant > Runtime > Global Entries where it is pointing to this file that i have no idea why it should be there. Deleted it and now build.xml works perfectly.

Greetings from Malaysia.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse-Ant-Classpath trouble.
 
Similar Threads
ANT could not find class for <junit>
Unable to find a javac; Perhaps JAVA_HOME does not point to the JDK
Using NMAKE utility in Eclipse
Using Ant from within Eclipse 3.x
About ".classpath" file in the project