1. 程式人生 > >Eclipse下啟動tomcat報錯:/bin/bootstrap.jar which is referenced by the classpath, does not exist.

Eclipse下啟動tomcat報錯:/bin/bootstrap.jar which is referenced by the classpath, does not exist.

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.

計算機生成了可選文字:國p「o匕lemoccu「red心)'StartinaTomcatv7.0Serveratlocalhost,has~encounteredaproblem·Thearchive:C:/ProgramFiles(x86)IJavaljdkl.7.0--10llibltoolsjarwhich15referencedbytheclasspath,doesnotexist.

2.原因:

這是因為我中途移動過tomcat的位置的緣故,而Eclipse中對於tomcat配置卻沒有改變。

3.解決:

開啟Eclipsetomcat配置,就是雙擊server選項卡中的tomcat,然後選擇openlaunch configuration,如下圖所示:

計算機生成了可選文字:日overviewGeneralInformationSpecifythehostname卜Pandothercommonsettings.TomCatv7.0Se四erat!OCalhOSt卜下lSe四ername:日OStname:localhost,pM0陌舊舊舊叢迎血吐止迅魚匹四回止一ApacheTomcatv7·0三Con6gurationpath:/serve「s二omcatv7.oserverat.oca.卜IB「owse日,ServerLocationsSPecifytheserverPoth(i.e.cotolino.bose)。nddeployPath.ServerrnustbePublishedwithnomodulespresenttomakechanges.UseworkSPacemetadata(doesnotmodifyTomcatinstallation)‘國use丁omcatinstallation(takescontrolof丁omcatinstallation)UsecustomIocation(doesnotmodifyTomcatinstallation)卜~

開啟以後會出現如下介面:

如上圖所示,我標註出了錯誤路徑,將這個錯誤路徑刪除,並保證正確配置tools.jarbootstrap.jar這兩個jar包的路徑。

小結:在移動相關資源或者依賴資源的時候會對原有的依賴它的專案產生影響.儘量將自己的IDE和相關的環境固定,少做更改,減少那些隱藏的錯誤出現的機率.