How to use chmod from java code
I have created a directory as a root user inside the home of other user. i want to change the ownership of that directory, from java code. How can i do this?
I have created a directory as a root user inside the home of other user. i want to change the ownership of that directory, from java code. How can i do this?
> So i will have to use the Runtime class and execute
> the required command.
That's your best bet, yes. Java doesn't have a way to do this. Have a look around Sourceforge and the like, see if there exists a library that manipulates *nix file permissions from Java, wouldn't surprise me if there was
> tanku guys. got it to work with exec
Sweet! Would you mind posting the code in case someone else has the same problem in the future?