Re: Eclipse and NSBundle.mainBundle().resourcePathsForResources

From: Chuck Hill (chil..lobal-village.net)
Date: Sat Jul 19 2003 - 13:13:35 EDT

  • Next message: Kaj Hejer: "Re: Eclipse and NSBundle.mainBundle().resourcePathsForResources"

    Kaj,

    Two things to check / try:

    1. In the lancher make sure the working directory is set to MyApp.woa

    2. Add the built jar (MyApp.woa/Contents/Resources/Java/myapp.jar) to the
    Launcher's class path.

    NSBundle uses some very funky methods to find resources at runtime.

    I've also has some problems related to this with the incremental builder.
    I can't recall the specifics. I think it was that the incremental builder
    only builds code but not resource changes etc. You could also try doing a
    full Ant build and see if that moves things into the right place.

    Chuck

    At 06:21 PM 19/07/2003 +0200, Kaj Hejer wrote:
    >Hi!
    >
    >When running my application from Eclipse (Eclipse 2.1.1, WOOLipse
    >1.0.4, osx 10.2.6) the following return null:
    >
    >NSBundle.mainBundle().resourcePathsForResources(null, null)
    >
    >but when building my app with ant and start it from the commandline I
    >het what I expect to see:
    >
    >("Nonlocalized.lproj/Admin.api", "Nonlocalized.lproj/Arkiv.api",
    >"Nonlocalized.lproj/Batch.api",
    >"Nonlocalized.lproj/BloggForInclude.api",
    >"Nonlocalized.lproj/Blogginnstillinger.api",
    >"Nonlocalized.lproj/Bloggside.api",
    >"Nonlocalized.lproj/build.properties",
    >"Nonlocalized.lproj/DisplayPeker.api",
    >.... and so on.
    >
    >I'm using incremental build.
    >
    >
    >Am I doing something wrong here since I get null when running from
    >inside eclipse? Is it possible to get this to return what I should :)
    >when running the application from inside Eclipse?
    >
    >TIA!
    >
    >
    >-Kaj :)
    >

    --
    

    Chuck Hill chil..lobal-village.net Global Village Consulting Inc. http://www.global-village.net



    This archive was generated by hypermail 2.0.0 : Sat Jul 19 2003 - 13:13:12 EDT