File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes what does this error message mean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what does this error message mean" Watch "what does this error message mean" New topic

what does this error message mean

Rick Rod

Joined: Nov 20, 2005
Posts: 10
I am trying to compile and am getting this error message can someone tell me how to correct this.

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

It looks like your Java installation is corrupt, as the javac command can't find the JAR file that contains the Java compiler (it's normally called "tools.jar"). I'd try reinstalling your JDK -- unless you've just done something odd like move files around yourself, in which case putting everything back where you got it should fix things.

[Jess in Action][AskingGoodQuestions]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

It could also be that you have different versions of the JDK on your system and you're mixing them up because your PATH is not set correctly.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
It is sorta covered in the JavaRanch Style Guide.
subject: what does this error message mean
Similar Threads
ARRRGGGGHHH - Stupid Javabeans - Again! :(
unable to compile class for JSP
How to create a package in Java?
I Cannot Get My Thread Program Compiled
please help