Eclipse and OS X and import java.util.Scanner

Discussion in 'Mac Programming' started by prostuff1, Apr 4, 2006.

  1. macrumors 65816

    prostuff1

    Joined:
    Jul 29, 2005
    Location:
    Don't step into the kawoosh...
    #1
    I have just started my CS&E classes. Now we use windows and that is fine with me but i really dont want to have to go to the labs to do all my CS&E homework. I have installed the Java 1.5 stuff and did the terminal stuff to get it as the defualt java for everything. I followed the instrucation on this site.

    I am using the import java.util.Scanner and i keep getting a message that says java.util.Scanner cannot be resolved.

    Please help me out so i dont have to spend much amount of time sitting in craptastic chairs in the labs.

    Thanks
     
  2. macrumors regular

    Joined:
    Aug 19, 2005
    Location:
    Canada
    #2
    What is your current version?

    If you open up a terminal and type

    java -version

    what is your output?
     
  3. macrumors 6502

    Joined:
    May 17, 2002
    Location:
    Denver, CO
    #3
    Is the Compiler compliance level in Eclipse set to 5.0? You can check this by going into the project properties (option+Enter) -> Java Compiler -> JDK Compliance.
     
  4. thread starter macrumors 65816

    prostuff1

    Joined:
    Jul 29, 2005
    Location:
    Don't step into the kawoosh...
    #4
    when i run that command in terminal i get this
    java version "1.5.0_05"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83)
    Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing)


    And:
    This was it i think... It now tell me that it is not used instead of not being able to be found. I had selected it when i first started the project but for some reason it wanted me to select it there instead of at startup.

    Thanks so much and everything seems to be fixed now.
     

Share This Page