1、 運(yùn)行tomcat后打開(kāi)網(wǎng)頁(yè),瀏覽器顯示如下錯(cuò)誤:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
首先,你必需檢查一下自己的環(huán)境變量是不是正確;這個(gè)我想大家都會(huì),只是有時(shí)候重裝JDK而忘了改,不過(guò)檢查一下看看就行了。
其次:在JDK的lib目錄下有一個(gè)tools.jar文件,你把它拷到Tomcat安裝目錄下的common\lib目錄下,或者在tomcat下作如下修改,效果一樣
最后:如果不可以,在打開(kāi)tomcat的configue tomcatg ,找到j(luò)ava,在java optioons里填上:-Djava.home=C:\Program Files\Java\jdk1.5.0_04;就好了。