-
Wtf?!?! *resolved*
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?
-
Win XP threw command line j2sdk1.4.0_02
-
Have you done any set-up besides just installing the jdk?
-
yeah i also added the path to the enviromental variables
-edit
also installed textpad a nice little editor
-
-
it really bugs me because it runs on my desktop but not on my laptop... with the same file hell id be happy if it only ran on my laptop :(
-
Right now im running win 98 so im not too sure what the set-up differences are if any.
-
1 Attachment(s)
the differences are....
... see attached readme.html .. that has been zipped
hehe wopse almost rar'ed it instead
-
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
-
just got the same error after a lot of typeing
x.x well im done trying to get this to work 4 now...... ill prolly try again when i get back home in afew days thanks anyway ;)
-
remove the classpath and see what happens
-
ARF!!!
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 :rolleyes:
mabey ill go crazy and delete things when they dont work.... allready proven the correct meathod once x.x
-
At least you got it working. :D