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



I was assuming that the "working directory" does not really matter.  If your problem is, as you say, that you need to access files in a subdirectory of the user's home directory, then it does not matter what the "working directory" is: you can specify the location of that directory as an absolute path, and you can construct that path in your code by concatenating the relative path obtained from Info.plist to the value of the user.dir property.

I hope that is clearer.

Geoff

On 10 Jan 2007, at 18:49, Yahya Cahyadi wrote:

Thanks for the reply Geoff. 

I guess I haven't clearly understood your suggestion.
I take it that you are suggesting that I declare my user.dir as "Library/Application Support/Workstation" in my Info.plist. But doing so would make the VM set the current dir to "/Library/Application Support/Workstation", and not "~/Library/Application Support/Workstation". 

Yahya

On Jan 10, 2007, at 4:13 AM, Geoff Levner wrote:

Another option would be to store in your Info.plist a relative path, i.e. "Library/Application Support/Workstation", and modify your Java code to use user.dir as the base directory.

Geoff

On 10 Jan 2007, at 01:26, Michael Hall wrote:

An option might be to go with launching a Unix script as per...
[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.



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