Solved

chown and chmod in java

Posted on 2006-06-25
5
3,019 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 50 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 100 total points
ID: 16980197
0
 
LVL 14

Assisted Solution

by:hoomanv
hoomanv earned 100 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 50 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…

860 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