Java - Runtime.getRuntime().exec() what's going on?
        Posted  
        
            by kunkanwan
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by kunkanwan
        
        
        
        Published on 2010-06-13T13:37:50Z
        Indexed on 
            2010/06/13
            13:42 UTC
        
        
        Read the original article
        Hit count: 360
        
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 :)
© Stack Overflow or respective owner