Eclipse下启动tomcat报错:The archive: C:/Program Files(x86)/Java/jdk1.7.0_10/lib/tools.jar which is refere

时间:2024-03-19 19:48:39

1.错误:

Eclipse下启动tomcat的时候,报错为:Eclipse下启动tomcat报错:The archive: C:/Program Files(x86)/Java/jdk1.7.0_10/lib/tools.jar which is referenced by the classpath, doesnot exist.

Eclipse下启动tomcat报错:The archive: C:/Program Files(x86)/Java/jdk1.7.0_10/lib/tools.jar which is refere

2.原因:

这是因为我中途移动过tomcat的位置的缘故,而Eclipse中对于tomcat配置却没有改变。

3.解决:

打开Eclipsetomcat配置,就是双击server选项卡中的tomcat,然后选择openlaunch configuration,如下图所示:

Eclipse下启动tomcat报错:The archive: C:/Program Files(x86)/Java/jdk1.7.0_10/lib/tools.jar which is refere

打开以后会出现如下界面:

Eclipse下启动tomcat报错:The archive: C:/Program Files(x86)/Java/jdk1.7.0_10/lib/tools.jar which is refere

如上图所示,我标注出了错误路径,将这个错误路径删除,并保证正确配置tools.jarbootstrap.jar这两个jar包的路径。


小结:在移动相关资源或者依赖资源的时候会对原有的依赖它的项目产生影响.尽量将自己的IDE和相关的环境固定,少做更改,减少那些隐藏的错误出现的几率.