> So you would have to execute the command in this way :
> javac HelloWorldApp the class loader would look for a file with that
> name and a .class extension
A typo maybe? It should be java HelloWorldApp
> Exception in thread "main" java.lang.noclassdef
This question has been asked a lot of times on almost all java related message boards. Have you tired a web search with the given error message? Have you tried the solutions suggested in the existing threads?
BTW, the `java' command expects a "package qualified" class name and not just a class name. So if you are using a package, make sure you use the fully qualified class name when invoking `java'. If not, then executing the `java' command from the same directory in which the class file lies shouldn't be a problem as such.
Also, is the NoClassDefFoundError error thrown for the main class or some other class which the main class is using? In this case, you might have unresolved runtime dependencies which you will have to resolve by setting the appropriate classpath entries.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
Offline 8,871 posts
since Jun 2006