Scanner Errors: Only on Mac OS X

Discussion in 'Mac Programming' started by bobber205, Jan 18, 2006.

  1. macrumors 68020

    bobber205

    Joined:
    Nov 15, 2005
    Location:
    Oregon
    #1
    I was helping a friend on mine fix his homework code...

    And once it was done it ran fine on his, but not on mine. The scanner class in the utility of java isnt' on my compouter apparently...

    Is it running on yours?
    Thanks.:D
     

    Attached Files:

  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  3. macrumors newbie

    Joined:
    Jan 15, 2006
    #3
    Bingo!

    Code:
    [reikon@reikon: ~/Desktop/weirdJavaError ]$ java ChangeMakerTester
    Exception in thread "main" java.lang.UnsupportedClassVersionError: ChangeMakerTester (Unsupported major.minor version 49.0)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    *grumble* *grumble*
    
    Code:
    [reikon@reikon: ~/Desktop/weirdJavaError ]$ java5 ChangeMakerTester 
    What is the amount due?3
    
    What was the amount paid?2
    
    Amount Due:$3.00
    amount recieved:$2.00
    
    Excuse me, you still owe me another$2.00
    [reikon@reikon: ~/Desktop/weirdJavaError ]$ 
    I don't think 3 - 2 = 2 though.
     

Share This Page