Solved

chown and chmod in java

Posted on 2006-06-25
5
2,985 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:mayankeagle
mayankeagle 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now