Making a file writable
Hi,I see class java.io.File has a public method setReadOnly(): boolean. But I don't see a reverse method, i.e something like setWritable().Is there a way to make a file writable, without resorting to JNI?I am using JDK 5.0Thank you
[267 byte] By [
cristiba] at [2007-11-27 4:06:40]

# 3
> Yes, this is what I need. But setReadOnly() doesn't
> take a boolean argument.:( Any workaround?
>
> Thank you
Install Java 1.6: there are numerous enhancements in the File class concerning permissions:
http://java.sun.com/javase/6/docs/api/java/io/File.html
# 5
Hi,By using JDK 5.0, we can not give write access to a file. It is possible in JDK 6.0. In case if you want to do it with JDK 5.0 itself, use the DOS command with Runtime, your problem will solve.What will you say ?