Re: Finding the path that my Application is running in
Re: Finding the path that my Application is running in
- Subject: Re: Finding the path that my Application is running in
- From: Evan Coyne Maloney <email@hidden>
- Date: Mon, 4 Feb 2002 14:17:41 -0500
On Monday, February 4, 2002, at 02:07 PM, Markus Hitter wrote:
Am Montag den, 4. Februar 2002, um 18:35, schrieb Evan Coyne Maloney:
Since you're using Java, there's a little trick for determining the
current working directory. Instantiate a File object with a path of ".".
Ouch. This doesn't for a non-root user, does it?
Hopefully not, a random user should have write access to only few
well-known places outside his Home (like /tmp, /var/tmp). Else, what would
stop her/him from replacing the kernel?
The Java File class lets you create an instance of File that points to any
path that exists (or doesn't exist) on the system. Just because you can
create the File object doesn't mean you have read/write/execute permission
to the path pointed to by that File. Java does not bypass the standard
MacOS/Unix/Windows file permissions in any way.
Evan Coyne Maloney____________________________________________________
The six-legged fire-breathing dog email@hidden