• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finding the path that my Application is running in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Finding the path that my Application is running in (From: Markus Hitter <email@hidden>)

  • Prev by Date: Re: Finding the path that my Application is running in
  • Next by Date: Re: Getting rid of an NSWindowController
  • Previous by thread: Re: Finding the path that my Application is running in
  • Next by thread: Re: Finding the path that my Application is running in
  • Index(es):
    • Date
    • Thread