JDK Version

Discussion in 'Mac Programming' started by ryan42, Jul 12, 2005.

  1. ryan42 macrumors 6502

    ryan42

    Joined:
    Dec 3, 2003
    Location:
    Near Houston, TX
    #1
    Is there any way I can compile with JDK 1.5 (J2SE 5.0) through XCode? Thanks.
     
  2. GilGrissom macrumors 65816

    GilGrissom

    Joined:
    Mar 13, 2005
    #2
    Ye, and to compile in 1.5 full stop! I know you have to invoke 1.5 as the prefered over 1.4, but how exactly. Apple site says:
    ...someone translate this for dummies?...how would one do this exactly?!

    I imagine if we both knew how to do this then it would apply for xcode too??...

    I know no one has read or replied to this thread for ages...any help would be appreciated! Sorry for dragging it up again...I'm doing a search through any thread I can find to try and find my solution!!
     
  3. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    The quote above means that for every command you want to use JDK1.5 for you need to preface it with the path supplied. This is not a do it once then it's set operation. It's a do it every single time operation. So to compile a single Java file you would do (in Terminal)

    /System/Library/Frameworks/JavaVM.framework/Versions/1.5/javac (maybe not, you probably need stuff betweeb 1.5 and javac, but I'm not on a Mac right now) filename.

    It might be possible to tell XCode to use this on a project by project basis...
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    The answer on setting up a new template for XCode to use Java 1.5 is here. Google is your friend! Note I've not tried this....
     
  5. ll350 macrumors member

    Joined:
    Oct 23, 2004
    Location:
    Chapel Hill, NC
    #5
    I used the process linked to here to get Eclipse running on 1.5. Just my 2 cents.
     

Share This Page