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/...??
"\auto_saved.txt"is not valid Java and will cause a compile error. It'd have to be"\\auto_saved.txt". Are you sure that's your real code?