I'm goign frickin' insane. This has always worked before...

Discussion in 'Programming General' started by CruZr, Nov 30, 2008.

I'm goign frickin' insane. This has always worked before...
  1. Unread #1 - Nov 30, 2008 at 10:33 PM
  2. CruZr
    Joined:
    Aug 9, 2008
    Posts:
    969
    Referrals:
    0
    Sythe Gold:
    0

    CruZr Apprentice
    Banned

    I'm goign frickin' insane. This has always worked before...

    NONE of ym class files will run.
    So I tried the first I ever made, that I KNOW works.

    I still get this error.
    [​IMG]





    I have never once gotten this before, I've ran like 50 class files successfully by typing "java name.class"

    Yes, the class file IS in the directory C:\Compiler.

    Whaaat keeppss happeneinggg..
     
  3. Unread #2 - Nov 30, 2008 at 10:37 PM
  4. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    I'm goign frickin' insane. This has always worked before...

    To run the class you should use "java className" and not "java className.class" as you have done in the picture above.
     
  5. Unread #3 - Nov 30, 2008 at 10:41 PM
  6. CruZr
    Joined:
    Aug 9, 2008
    Posts:
    969
    Referrals:
    0
    Sythe Gold:
    0

    CruZr Apprentice
    Banned

    I'm goign frickin' insane. This has always worked before...

    I have always had .class on the end.
    o_O
    Thanks, 1 sec I'll try it without.
    Edit: I must have some screwed up memory cuz it worked lmfao.
    Thanks :p
     
  7. Unread #4 - Nov 30, 2008 at 10:46 PM
  8. Timestamp
    Referrals:
    0

    Timestamp Guest

    I'm goign frickin' insane. This has always worked before...

  9. Unread #5 - Dec 21, 2008 at 10:37 AM
  10. super_
    Joined:
    Dec 20, 2008
    Posts:
    91
    Referrals:
    0
    Sythe Gold:
    0

    super_ Member

    I'm goign frickin' insane. This has always worked before...

    the JVM loads all class files in the classpath and defines them BY CLASS NAME and not by filename. if the main class is hello, and its in hello.class, you simply add it to the classpath if needed and do:
    java [additional args] hello
     
  11. Unread #6 - Jan 1, 2009 at 7:16 AM
  12. broady
    Joined:
    Nov 15, 2008
    Posts:
    22
    Referrals:
    0
    Sythe Gold:
    0

    broady Newcomer

    I'm goign frickin' insane. This has always worked before...

    Also, class names should start with a capital letter.
     
< need a little help making an auto alcher | A Class that represents a Deck of cards >

Users viewing this thread
1 guest


 
 
Adblock breaks this site