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 ()
Solution:Java_home (Java installation directory)/lib/tools. JarCopy to tomcat_home (tomcat installation directory)/common/lib and restart tomcat.
Causes and solutions:
When Tomcat is installed, the JRE path is specified. As a result, atat_home and java_home have been added to environment variables, but the following exception occurs when JSP is started:
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
The cause is that Java. home refers to $ java_home/JRE, and the tools under its Lib. jar and $ java_home/lib/tools. jar is different. The latter must be used for JSP compilation.
Note: Java. Home points to $ jre_home during running.
JDK 1.4.2 _ 06-b03
JDK 1.5.0 _ 05-b05
This is the case.
Modification Method: In the atat (((((( ate5w.exe) Java option-> Java Virtual Machine
Set to % java_home %/JRE/bin/Server/JVM. dll
Tomcat console Java option-> JAVA classpath:
% Tomcat_home %/bin/Bootstrap. jar; % java_home %/lib/tools. Jar
Note: % java_home % and % atat_home indicate the installation root directories of JDK and tomcat respectively.