I wanted to open a file in notepad(using JAVA) by…
proc.exec(“notepad “+curDir+”\auto_saved.txt”);
where…
String curDir = System.getProperty("user.home");
curDir=curDir+"/txt-files";
Runtime proc = Runtime.getRuntime();
this works properly in WIN7 but says ‘home……….\auto_saved.txt’ PATH not found. in LINUX.
but if I save a file to (curDir+”\auto_saved.txt”);..it creates a file and saves it in LINUX.
So, how to open a file in /home/user/some-folder/…??
1 Answer