Solved

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

Posted on 2001-08-15
5
855 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
  • 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 50 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySqlDump not dumping triggers 1 31
throw exception 21 44
maven module vs maven project 3 23
How to determine if a string is a valid SHA value 7 31
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

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