java.lang.NoClassDefFoundError: sun/tools/javac/Main

Posted on 2001-08-15
Last Modified: 2013-11-21

javax.servlet.ServletException: sun/tools/javac/Main
java.lang.NoClassDefFoundError: sun/tools/javac/Main

I am getting this error whenever I try to run Tomcat 3.2 sample code.

is there a way to fix this?

Question by:xxxJohnnyBlaze
  • 3
LVL 19

Expert Comment

by:Jim Cakalic
ID: 6390361
I believe this can be corrected by adding tools.jar to the server's classpath. The tools.jar is usually to be found in the lib directory of your JDK installation.

LVL 19

Expert Comment

by:Jim Cakalic
ID: 6390387
It may also be necessary to add the bin directory of your JDK installation to the PATH variable used by Tomcat.
LVL 19

Accepted Solution

Jim Cakalic earned 50 total points
ID: 6390418
And, for what it's worth, here's a link to a jguru FAQ entry on this topic:

Expert Comment

ID: 6391612
Set the environment variables TOMCAT_HOME to your Tomcat installation directory and JAVA_HOME to your Java installation directory. This has the side-effects of setting up the classpath for Tomcat correctly (that tools.jar is found and the is loaded).

Author Comment

ID: 6393040
thanks for your help again, Jim

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
check java version using powershell 13 288
Running JavaFX on JDeveloper 12C 1 76
printf performancy 11 84
Cisco ASA: Java web start no go, asdm launcher no go 3 57
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
What You Need to Know when Searching for a Webhost Provider
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question