DG wrote:
>I have a Java application that includes some shell scripts inside the .app
>bundle that I would like to execute. Problem is, I am trying to find the
>path of the shell scripts within the bundle (the absolute path up to the
>..app directory would be enough). Previously I could use my "kick-off" shell
>script to set up an environment variable to the path. I don't want to use
>the current working directory or assume the name of the .app bundle, in
>case the use renames the bundle, or runs from a different directory.
I think you just define a property in the Properties dictionary of the
Info.plist whose value is $APP_PACKAGE. If the value begins with that
special pattern, it will be substituted with the real bundle pathname by
the launcher before the JVM is invoked.
The value must START with the pattern. Embedded patterns are not
substituted. The value can END with literal text.
Examples:
$APP_PACKAGE
$APP_PACKAGE/Contents/Resources/subdir/filename
For a real-world example, look inside the utility Java Web Start.app. It's
a Java app with an Info.plist, and it uses the $APP_PACKAGE to set one of
the jnlpx Properties. It's possible it doesn't use the normal launcher
stub, so I may be reading more into it than the normal stub offers.
In any case, it's easy to test.
By the way, a kick-off shell script can else find and set a value, if you
want to go that route rather than Info.plist. See the prelude shell-script
in this article:
<http://www.amug.org/~glguerin/howto/More-open-files.html>
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden