I want to create directory in ubuntu at location /opt/ and the code is
File file=new File("/opt/myFolder"); file.mkdir();
executed successfully but directory is not created because the location is read only.Is there any way to give the write permission to ubuntu directory using java program.