Allright so i have the easyist java program in the world complete...
i compile it run it, and test it. Works fine.
I copy the .java to my laptop, (which has the same SDK set up and path var set), compile compleats fine, run it i get Exception in thread "main" java.lang.NoClassDefFoundError: SevenApp
what? it should work fine i copy the .class to my other computer and run it, it works!!! Someone help me i need java to work on my laptop.
if u really wana see the simple prgm source... here it is...
Code:
public class SevenApp {
public static void main(String[] args) {
for (int i=1; i<100; i++) {
if ((i % 7) == 0) {
System.out.println(i);
}
}
}
}
It seems the system classloader is unable to find the .class file to run. What os are you running? How are you running your .class files? IDE, command line?
The only difference i can see between 98 and XP is that instead of pulling up the autoexec.bat file you are going to a tab to set the path. Try specifying the path on the command line itself and see what happens. ie C:\ java -classpath C:\Dir; MyProg
funny thing is the other day I did exactly that... and it worked, apparently the sdk install put in its own little path var that didnt point to the sdk stuff... so no i feel stupid lol
mabey ill go crazy and delete things when they dont work.... allready proven the correct meathod once x.x