Quote:
Originally Posted by 2B || !2B
Thank you so much!
I guess ~/ only works in desktop linux.....
|
The ~ is normally interpreted by the shell, not the kernel. I believe that java is attempting to open the file directly through an fopen() or equivalent call. I believe that you can get the value of the HOME environment variable and use it in place of the ~ to avoid hardcoding paths.
Code:
.
.
Map<String, String> env = System.getenv();
.
.
f = new File(env.get("HOME") + "/Output.txt");
.
.