AppBundler: wrong working directory
Greg Brown
greg.x.brown at oracle.com
Tue Feb 28 09:30:21 PST 2012
Hi Tobi,
You are correct - the Ant bundler doesn't currently set the working directory. I have proposed modifying the launcher app to set the working directory to the bundle root:
http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-February/003289.html
However, I'm not sure that would have any effect on the behavior you are seeing. The launcher is now calling JLI_Launch() to start the JVM rather than calling into JNI directly. JLI_Launch() may be setting the working directory to the user's home directory (which may be intentional - I'm not sure yet).
What impact does this have on your app? Is it something you could work around if it turns out that user.home is the correct default?
G
On Feb 28, 2012, at 11:42 AM, Tobias Bley wrote:
> Hi,
>
> When I create an *.app with the new AppBundler ant task I don't get the right working directory.
>
> File workingDirectory = new File(".").getAbsolutePath();
>
> => /Users/<username>
>
>
> When I try this with Apples JavaAppLauncher with JDK6 I get
>
> => <path-to-app-bundle>/Contents/Resources/
>
> I suppose the problem is that the AppBundler ant task does not set the working directory into the app-bundle...
>
> Any suggestions?
>
> Best regards,
> Tobi
>
>
>
>
>
More information about the macosx-port-dev
mailing list