This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in compiling a source code *.java

 
Jess
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I compile a source code *.java with SDK 1.4 there is an Error Message:
"Exception in thread "main" java.lang.NoClassDefFoundError...etc.
What's the problem?
Describe me the procedure exactly!
Help me! I'm beginner!
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jess:
When I compile a source code *.java with SDK 1.4 there is an Error Message:
"Exception in thread "main" java.lang.NoClassDefFoundError...etc.

NoClassDefFoundError is caused by classpath problems, which one can solve by consulting the appropriate section of the
beginners FAQ, however, we don't usually see that error when compiling. Are you attempting to use the Java Virtual Machine (i.e. "java") to compile instead of the compiler (i.e. "javac")? If you want "exact" answers you must ask "exact" questions, like including the complete command line you issued and the complete error which occurred.
 
Jess
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I specify it step by step:
1- C:\j2sdk1.4.1_02\src\java\awt > javac Rectangle.java
2- Error Message: Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
Thanks!
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a bigger problem. Check out this thread in the Java Technology Forums:

the best alternative is to uninstall and reinstall java
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jess,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic