eclipse external tools configurations -> referenced library in classpath does not exist: org.eclipse.swt

拟墨画扇 提交于 2021-02-08 15:45:48

问题


After updating to the latest eclipse mars release

Version: Mars Release Candidate 1 (4.5.0RC1)
Build id: 20150521-1252

I am not able to start any Ant Script. It always results in the following error:

ErrorDialog

First I checked if the path is really correct, and made sure that the specific jar org.eclipse.swt.win32.win32.x86_64_3.104.0.v20150513-1901.jar exists at the given location, which it does. After some digging I noticed the following within the external tools configurations:

ExternalToolsConfiguration

Somehow I think eclipse is not able to resolve the classpath with the given '%20' tag within the url to the library. Usually there is just a blank. Restoring the defaults always fills in the '%20' for this specific library.

So I created a copy of eclipse at a location without blanks and all works fine again.

Unfortunatly I would prefer keeping the location at it is, so is there a way to correctly resolve the classpath for Additional Tasks & Support?


回答1:


This is a known bug in Eclipse Mars:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=470390

Update: Eclipse 4.5.1 was released on October the 2nd and the bug has been fixed. An Eclipse update will resolve this issue.




回答2:


There is one other "fix" that's basically an easier workaround.

If you go to your Ant build configuration (under External Tools, then highlight your configuration and select the JRE tab) and change from running an external JRE to the top button, that is, "Run in the same JRE as the workspace", this will make it work.




回答3:


I resolved this by moving C:\Program Files\eclipse to C:\eclipse

Answer also found here, Eclipse Mars: ANT Task references missing SWT library



来源:https://stackoverflow.com/questions/30529205/eclipse-external-tools-configurations-referenced-library-in-classpath-does-no

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!