Google Answers Logo
View Question
 
Q: Java File Permissions ( No Answer,   1 Comment )
Question  
Subject: Java File Permissions
Category: Computers > Security
Asked by: dwightc-ga
List Price: $2.00
Posted: 03 Oct 2002 07:16 PDT
Expires: 02 Nov 2002 06:16 PST
Question ID: 72018
I think this is an easy one.  In the Java Language, how do I determine
if I have permission to execute a file (execute permissions for the
user the program is running under) without acutally running that
program (shell script/Unix or batch file/Windows)?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Java File Permissions
From: seizer-ga on 03 Oct 2002 08:14 PDT
 
Hi there Dwight.

File permissions are a system specific concept, and as such, Java
doesn't have any inbuilt functionality for doing this.

If you knew that you were on a Unix system, you could use the Runtime
class to execute chmod or the like. See here for more:

http://java.sun.com/j2se/1.4/docs/api/java/lang/Runtime.html

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy