?
Solved

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

Posted on 2001-08-15
5
Medium Priority
?
903 Views
Last Modified: 2013-11-21
Hi,

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?

thanks,
Johnny
0
Comment
Question by:xxxJohnnyBlaze
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
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.

Jim
0
 
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.
0
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 150 total points
ID: 6390418
And, for what it's worth, here's a link to a jguru FAQ entry on this topic:
    http://www.jguru.com/faq/view.jsp?EID=455768
0
 
LVL 3

Expert Comment

by:dnoelpp
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 sun.tools.javac.Main is loaded).
0
 

Author Comment

by:xxxJohnnyBlaze
ID: 6393040
thanks for your help again, Jim
0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 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