开发者

AntSecurityException when opening ant-file in eclipse

one in a while eclipse refuses to open antfiles. The error log tells me that an "AntSecurityException" is the cause. The javadoc for org.eclipse.ant.core.AntSecurityException tells me that the exception is thrown when an ant task wants to stop the jvm. But just opening an ant build should not start any targets or tasks. The only solution is to restart eclipse开发者_高级运维.

Does someone know how to stop this rather irritating behavior of eclipse.

Regards, Jan


I have never come across this exception myself. Just out of interest what version of Eclipse are you using?

I did find a solution on the web regarding this though and it is in the folding option of the Ant editor. Try disabling the folding option for Ant editor by going: Windows -> Preferences -> Ant -> Editor -> Folding tab. Uncheck 'Enable folding'


For me disabling Folding did not solve the problem. I dig deeper and found Bug 143416 in Eclipse.

I could get rid of this by removing the xercesImpl.jar and xml-api.jar from the Ant installation that I used, not sure if you are facing the exact same problem or if there are multiple things that cause the exception to appear. It seems the version of xerces/xml-apis in my Ant (v. 1.7.1) interferes with the classes in Eclipse/JDK itself.


Windows -> Preferences -> Ant -> Show error dialog when ant fails


I have this problem very often.

Now I saw a setting Window-> Preferences-> Ant-> Editor-> Problems-> Security Problems. I set it to Ignore and 'll see if it helps. :-)


Close eclipse , go to workspace, delete the .metadata, start the eclipse, only one drawback you have to do all the manual setting again

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜