I tried to create a Undeletable folder using java code. I use the command \"cacls (Foldername) /e /c /d %username%\" in command prompt it worke
Is the current working directory set to the parent directory of your "hidden" directory when you invoke the command? You can change it with ProcessBuilder.directory(java.io.File).
ProcessBuilder.directory(java.io.File)