Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

serious problem running java .class files

  Asked By: Nicole    Date: Jul 15    Category: Java    Views: 1048

This problem never happened before but here it is.... I seem to have a
problem running my java .class files. here it the output

[daddius@logic Desktop]$ java Hell
HelloWorldApp.class HelloWorldApp.java
[daddius@logic Desktop]$ java HelloWorldApp
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
[daddius@logic Desktop]$

now I know the for a fact that that HelloWorldApp.class file is there
but I keep getting a java.lang.NoClassDefFoundError. I also installed
the GCJ compiler for GCC to see if it would actually work.. But why
should this mess with java? What could be causing this problem?
please help somone



1 Answer Found

Answer #1    Answered By: Alberta Miller     Answered On: Jul 15

Check the CLASSPATH variable and make sure that "." is part of the

Also make sure that the java  being run is from the appropriate JDK
(i.e., if the class  uses 1.4 features, make sure it is being run with
the java from the JDK 1.4).

Didn't find what you were looking for? Find more on serious problem running java .class files Or get search suggestion and latest updates.