• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

noClassDef Found Error... help!!!

Hi all,
I have a piece of code which does a simple console print.. however, i get a noClassDefFound error... kindly advice...

printscreen: http://www.darrenix.com/help.gif
0
eturfclub
Asked:
eturfclub
  • 5
  • 4
2 Solutions
 
CEHJCommented:
Try

java -classpath . YourClass
0
 
CEHJCommented:
set classpath=.
javac why.java
java why
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
petmagdyCommented:
do this:

comandprompt:/> javac why.java
comandprompt:/> java -cp . why
0
 
petmagdyCommented:
Sorry CEHJ just 2 seconds difference
CEHJ,  just tell me the time u suppose to be in Bed according to GMT time zone
0
 
CEHJCommented:
Oh i never sleep - i might miss something ;-)
0
 
petmagdyCommented:
you can sleep as much as u can without missing any points, just build an artifical intellegence knowledge base , and then develop a java robot, that pool the queston search the KB and submit the answer, my myself r considering to  develop this and try it after 2 years
;-)
0
 
eturfclubAuthor Commented:
any idea what the prob might be with my command prompt?

using the java would nt do any good.
but using the java -cp . why worked

thankx again
0
 
petmagdyCommented:
think u missed to compile it, or the .class file was not in the same directory
0
 
CEHJCommented:
>>but using the java -cp . why worked

Well of course the answer i already gave would work as well !

>>java -classpath . YourClass

>>any idea what the prob might be with my command prompt?

Read the link i posted
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now