This content has been marked as final. Show 12 replies
Change to the directory that contains the compiled Hello World file (the .class file) and execute this command
Include the period and surrounding spaces following classpath
[path to]java -classpath . [the name of your class]
Assuming this works, learn about the classpath and how to use it. These forums have hundreds ot threads about it.
I am too getting an error like this: exception in thread "main" java.lang.noclassdeffound error. I am not able to resolve this issue. Please let me know the sol.
THANK YOU SOO MUCH! I've been troubleshooting this error for like 6 hours. this is the only solution that has worked.
Yes, thanks for the info. I was having the same problem.
send the program u have typed
send the program u have typedUmm... Why?
Anyway @NovaKane: Welcome. Together with seifist and sunny we have at
least three new posters who show enough intelligence to find chuck's
solution (or one of the many hundreds of others like it) and the politeness
to thank him for it. What's the forum coming to?
If you need it there is a description of the classpath here:
Again, welcome. And thanks for raising the intelligence level (and politeness
quotient) of the fora.
I think this might help you
there is some good information on this topic here
the site also has a demo of setting up the jdk
which can be of someuse to you
This thread is about 10 months old.
this is not the soloution if u have multiple clases than what shoul u do
java -cp . classname
will not work if u have a large number of files
Thank you dear ... it really helped
Java -cp . HelloWorld
Works well Thanks
Just place semicolon before the path, i mean for example ;C:\ in the classpath value under system variables