Java - Runtime.getRuntime().exec() what's going on?
- by kunkanwan
Hi,
I have problem with Runtime.exec() in Java
My code:
String lol = "/home/pc/example.txt";
String[] b = {"touch", lol};
try {
Runtime.getRuntime().exec(b);
} catch(Exception ex) {
doSomething(ex);
}
It's working good but when I trying changle variable "lol" files doesn't create in hard disk
for instance:
String lol = x.getPath(); where getPath() returns String
What should I do ?
Thanks for your reply :)