问题是当我尝试通过mkdir()创建目录时,它返回false。原因似乎是JVM没有足够的权限级别。我该怎么修?如何提高这一水平?
谢谢!
UPD!!!我解决了这个问题。
我找到了答案。但在我尝试这样的smth之前:
File fname = new File(currDir + args[i]);//currDir is the path where to create a folder
//and the args[i] is folder name
if (!fname.exists())
fname.mkdir();
但这里有一个错误,所以这是正确的代码:
File fname = new File(currDir + "/" + args[i]);
if (!fname.exists())
fname.mkdir();
就是这样=)