I am using Eclipse Kepler and I am trying to execute my build script.
When I run a task, I get an Ant error that says
Variable references non-existent resource :
${workspace_loc:/MyProject_JAVA/dev-new/build.xml}.
The problem is this path is wrong. It should be :
/MyProject_JAVA/dev/dev-new/build.xml.
I can go into External Tools and change the config for this one build, but if I try to run the task again, I get the same error.
How do I change where Ant thinks the build file is?
I met same problem , fortunately I solved it.
Go into preferences of Eclipse, and edit Ant - Runtime - Classpath.
You will find reason, and delete the error configured entry.
![](https://www.manongdao.com/static/images/pcload.jpg)
![](https://www.manongdao.com/static/images/pcload.jpg)
I think your closing curly brace is misplaced and I'm not sure the colon is necessary. Try:
${workspace_loc}/MyProject_JAVA/dev-new/build.xml
EDIT: I'm assuming you are using this in your Ant Build external configuration's "Main" tab, in the "Base Directory" field.
EDIT 2: Actually, as I look at your description closer, it appears the MyProject_JAVA folder exists outside of the workspace. Is that correct? If so, try using ${project_loc} instead.
To add on to billni's answer, you may have an incorrectly defined Ant classpath.
Find the bad path within Window > Preferences > Ant > Runtime > Entries
I have 3 entry types:
Ant Home Entries
Global Entries
Contributed Entries
For my situation, the bad path was in > Global Entries
To fix this, remove the bad path by selecting > Remove
Add the new and correct path by either using > Add JARs... or > Add External JARs...
Assuming your path is correct, and that there are no other errors, your build should now work!