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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
stringclean challenge 26 58
pairs challenge 5 45
advertisement module in core php 4 92
maven project error 5 24
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.
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now