| Author |
Runtime Error....
|
yunuss khan
Greenhorn
Joined: Apr 22, 2006
Posts: 17
|
|
Hi All, while running the code i m getting an error at run time. error is "Exception in thread "main" java.lang.noClassdeffoundError:Room1" room1 is my class name. pls help Thanks * Regards, john
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24045
|
|
Well, first: is the class name "Room1" or "room1"? Java cares -- it's case sensitive. Make sure you're typing the right one. Have you compiled your class? In other words, is there now a file called Room1.class? If all this is straightened out, then you may have a bad CLASSPATH setting. Try this: java -cp . Room1 that's "java space dash cp space dot space Room1". That should work!
|
[Jess in Action][AskingGoodQuestions]
|
 |
Ankur Sharma
Ranch Hand
Joined: Dec 27, 2005
Posts: 1234
|
|
Originally posted by yunuss khan: Hi All, while running the code i m getting an error at run time. error is "Exception in thread "main" java.lang.noClassdeffoundError:Room1" room1 is my class name. pls help Thanks * Regards, john
What are you giving at console as an Input...
room1 is my class name
and exception is
"Exception in thread "main" java.lang.noClassdeffoundError:Room1"
That mean you are typing java Room1 you must try java room1 Hope this helps.... If still any concern then revert with exact details.. what are you using....exactly...
|
The Best way to predict your future is to create it
Ankur Sharma
|
 |
yunuss khan
Greenhorn
Joined: Apr 22, 2006
Posts: 17
|
|
Hi Ernest, thanks for your help.. can you please let me know how can i set the classpath or path pernamently. on command prompt i m typind c:\jdk1.5.0_06\bin pls help, Regards, yunus
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24045
|
|
See http://faq.javaranch.com/view?HowToSetTheClassPath Pay special attention to the part that suggests not setting it at all! If you do choose to set it to something make sure "." (dot) is included.
|
 |
 |
|
|
subject: Runtime Error....
|
|
|