Results 1 to 14 of 14

Thread: ***?!?! *resolved*

  1. #1

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53

    Angry ***?!?! *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);
    			}
    		}
    	}
    }
    Last edited by awuh0; Sep 8th, 2003 at 09:29 PM.

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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?

  3. #3

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53
    Win XP threw command line j2sdk1.4.0_02

  4. #4
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Have you done any set-up besides just installing the jdk?

  5. #5

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53
    yeah i also added the path to the enviromental variables

    -edit

    also installed textpad a nice little editor

  6. #6
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Hummmmm.

  7. #7

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53
    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

  8. #8
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Right now im running win 98 so im not too sure what the set-up differences are if any.

  9. #9

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53
    the differences are....


    ... see attached readme.html .. that has been zipped

    hehe wopse almost rar'ed it instead
    Attached Files Attached Files

  10. #10
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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

  11. #11

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53
    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

  12. #12
    Lively Member
    Join Date
    Mar 2001
    Location
    Massachusetts, USA
    Posts
    111
    remove the classpath and see what happens

  13. #13

    Thread Starter
    Member awuh0's Avatar
    Join Date
    Feb 2003
    Posts
    53

    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

    mabey ill go crazy and delete things when they dont work.... allready proven the correct meathod once x.x

  14. #14
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    At least you got it working.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width