Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Info.plist, WorkingDirectory, and User's Home Dir



Thanks for your response Michael.

I just want to make sure that I get this right:
By having the unix script launch the application, does that mean I would have to specify the VMOptions and arguments in the script?


In which case my script would look something like this:
java -cp "$classpath" -Duser.dir="$workingdir" "$vm_opts" Shell

If it is true then it would reduce the maintainability of the app package, because if changes to the vm opts & args are necessary, then they have to be made on the script itself. I am still not sure how much of a concern this to my users, if at all, though. Hopefully not much.

Thanks,
Yahya

--ps: sorry Michael for this re-send.

On Jan 9, 2007, at 6:26 PM, Michael Hall wrote:


On Jan 9, 2007, at 4:32 PM, Yahya Cahyadi wrote:


<key>user.dir</key> <string>~/Library/Application Support/Workstation</string>

Sort of surprised me that you can successfully override the user.dir property at launch but it appears you can...


java -cp /Users/mjh -Duser.dir=/Users/mjh UserDir
/Users/mjh

What goes into the Info.plist is parsed by the JavaApplicationStub which has no way as far as I know as you mentioned to work with any kind of user variable.

An option might be to go with launching a Unix script as per...
http://www.amug.org/~glguerin/howto/More-open-files.html#prelude
[You specifiy the script as the application executable in the Info.plist file so not incompatible]


and have the script launch java with something like the above -D property set.

Mike Hall        mikehall at spacestar dot net
http://www.spacestar.net/users/mikehall
http://sourceforge.net/projects/macnative




_______________________________________________ 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
References: 
 >Info.plist, WorkingDirectory, and User's Home Dir (From: "Yahya Cahyadi" <email@hidden>)
 >Re: Info.plist, WorkingDirectory, and User's Home Dir (From: Michael Hall <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.