?
Solved

chown and chmod in java

Posted on 2006-06-25
5
Medium Priority
?
3,190 Views
Last Modified: 2006-11-18
Is there a standard java api to do chown and chmod?
I really don't want to have to have to do Runtime.getRuntime().exec("chown blah /blah");
0
Comment
Question by:aturetsky
5 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 16980158
In a word, no. You'll have to do it for each OS
0
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 16980197
0
 
LVL 14

Assisted Solution

by:hoomanv
hoomanv earned 400 total points
ID: 16980229
java 1.6 suports file permissions
http://download.java.net/jdk6/docs/api/java/io/File.html

setWritable
setReadable
setExecutable
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 200 total points
ID: 16981184
Platform specific commands should be stored in a properties-file preferably and not hard-coded in the code.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17038115
:-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month15 days, 21 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question