jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse-Ant-Classpath trouble." Watch "Eclipse-Ant-Classpath trouble." New topic

Eclipse-Ant-Classpath trouble.

M�rten Sj�strand

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

Joined: Sep 04, 2008
Posts: 2

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

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.
It's not a secret anymore!