Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception in thread "main" NoClassDefFoundError  RSS feed

 
pankaj kapoor
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a beginner in Java .
I am trying to run a simple java program but I am getting
"Exception in thread "main" java.lang.NoClassDefFoundError:" error when I run the program .
I suppose I am not able to set the (classpath/environment variables)
in my system.
could anyone help me for this. Thanks in advance

Pankaj
 
Peter Brockway
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but I am getting
"Exception in thread "main" java.lang.NoClassDefFoundError:" error when I run the program

There is an explanation and suggestions at the bottom of this page: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html Assuming you are using Windows, at a command prompt change to the directory containing the .java source file and enter the commands:
(Change HelloWorldApp to whatever your program is called.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!