Re: Obtaining launch arguments in XCode/java (NSProperties?)

From: John C. Beatty (jcbeatt..waterloo.ca)
Date: Fri Jan 28 2005 - 16:16:20 EST

  • Next message: John C. Beatty: "Re: Obtaining launch arguments in XCode/java (NSProperties?)"

    >The bad news: you're wasting your time.
    >The good news: you don't need to do anything.
    >
    >On the command line:
    >... -DMyParam=MyValue
    >
    >In the app
    >String myParam = System.getProperty("MyParam");
    >
    >now myParam.equals("MyValue")
    >
    >Chuck

    Sigh. Doesn't work for me ... but the arguments *are* showing up in
    argv, whether launched from the shell or in XCode (provided I supply
    them to Java - not to <projectName> - under Executables). So I rolled
    my own code to turn what's in argv into an NSDictionary. Perhaps
    there's something mucked up on my development machine - I'll have to
    try this elsewhere ...

    Thanks for the suggestion.

    -- 
    ------------------------------
    Prof. John C. Beatty
    School of Computer Science
    University of Waterloo
    200 University Avenue
    Waterloo, Ontario
    Canada  N2L 3G1
    +1 (519) 888-4567 x 4525 voice
    +1 (519) 885-1208 fax
    



    This archive was generated by hypermail 2.0.0 : Fri Jan 28 2005 - 16:19:58 EST