eclipse 常见错误


compile卡住

1、eclipse自带ant版本过旧,修改ant home
2、编码问题
3、run-->External Tools-->External Tools Configurations-->(右边)common里面编码改成utf-8

Failed to load JavaHL Library.

以前使用的电脑是32位的,安装的svn可以正常使用,但是现在的电脑室64位的,安装好svn后,把项目提交到svn的过程中,总是弹出来一个错误的对话框:

Failed to load JavaHL Library.

These are the errors that were encountered:

从网上查看了一下解决办法,

1. 选择window--->preferences->Team->SVN->SVN接口
2. 选择SVNKit (Pure Java) xxxxxx

如下图所示

项目有红感叹号

问题原因:工程中classpath中指向的包路径错误

解决办法:右键项目名称 BuildPath ---> Configure Build Paht...中,然后上面有几个选项卡找到 Libraries中 出现红色叉号的包为路径错误的包。到classpath中修改相应包的当前路径。然后回到eclipse中F5刷新工程。

下面两段为我解决此问题时在网上找的参考资料,可参阅:

你用myeclipse新建 web工程, 在工程目录下会生成一个 .classpath 配置文件, 里面是你工程里面引用的jar的配置。这个.classpath 对你的web工程没有什么影响,其实是给 myeclipse 识别的。 你说的这种情况是因为 .classpath 文件里面配置引用了某个jar,但是实际上你的 lib 里面并没有这个jar 所以才会有红色的提示。

你不用拿.classpath文件和你的jar一个个去找, 你现在打开MyEclipse 右键单击你的web工程,找到 Build Path > Configure Build Paht... 然后上面有几个选项卡找到Libraries。 这里看到的就是你工程里面引用的所有的 jar , 看看是不是在某个jar图标上有个很小的黄色的感叹号?如果有的话就没错了,先选中这个jar, 点击右边的 Remove > 点击OK 等待几秒,现在web工程上面的红色XX是不是没有了,哈哈。

解释一下: 黄色的感叹号的jar,表示.classpath配置文件引用了jar,但是实际上lib里面没有这个jar。

org.eclipse.ant.core.AntSecurityException

eclipse出现了这个错误

Error opening the editor.
org.eclipse.ant.core.AntSecurityException
org.eclipse.ant.core.AntSecurityException

找到一种解决办法。 Window->Preferences->Ant->Editor->Folding->"Enable folding when opening new editor 把这个选项去掉。就可以打开了。但是一样还是会有一个错误窗口。只是这个时候不影响你操作这个xml了。彻底的解决还不知道。

后来 重新启动eclipse就好了。估计是软件的bug

Variable references non-existent resource

当项目可以用终端ant运行,但是在eclipse中用ant运行时报错:

eclipse.buildId=unknown
java.version=1.6.0_07
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data D:\performances\QA.jmterTest -product org.eclipse.epp.package.jee.product -clean


 Error
 Tue Jul 20 17:09:18 CST 2010
 Variable references non-existent resource : ${workspace_loc:/JmeterTest/activation.jar}

这之类的错误,可能是你的ant运行依赖不需要的jar包,解决办法:

Simply remove unused jar from Ants classpath under Windows->Preferences->Ant->Runtime->Classpath

Joyce /
Published under (CC) BY-NC-SA in categories eclipse  tagged with eclipse  exception