File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what does this error message mean" Watch "what does this error message mean" New topic
Author

what does this error message mean

Rick Rod
Greenhorn

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.

C:\Java>javac PhraseOMatic.java
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/M
ain

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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: 14430
    
  23

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 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what does this error message mean