Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant build with Eclipse Mars fails due to missing classpath reference

I recently moved to Eclipse Mars and installed JDK 8u51. I'm using the JBoss Tools plugin with my Eclipse and have a couple of Ant files to build my projects.

When I double-click on a build file in the Ant view, however, my project won't built. Instead I get this error message:

The archive: C:/Program%20Files%20(x86)/Eclipse%20Mars/plugins/org.eclipse.swt.win32.win32.x86_64_3.104.0.v20150528-0211.jar which is referenced by the classpath, does not exist.

I checked the file system and the JAR is actually there. Any ideas how I could fix that? Maybe it's the spaces (%20) in the path name?

Unfortunately, I don't know where this dependency comes from. In the External Tools Configuration it is under Additional Tasks & Support, but I cannot edit the entry there. Nor did I find any other dialog where I can actually configure this reference.

like image 904
user1438038 Avatar asked Dec 11 '22 22:12

user1438038


1 Answers

Having had the exact same issue with Eclipse Mars, it turned out the problem was related to the '%20' stuff and not to the jar in itself.

You can either work on a different folder than "Program Files" (install eclipse somewhere else, ...), or create a symbolic link so that ant can see the existing repository the way it knows it. Run the following command in the elevated command prompt(Start > Type cmd > Right click and Run as administrator)

mklink /d c:\Program%20Files%20(x86) "c:\Program Files (x86)"

(and the same for "Eclipse Mars" directory, that you could also rename to remove the space)

like image 72
user3042096 Avatar answered Feb 16 '23 02:02

user3042096