S scrat Active Member Licensed User Longtime User Oct 25, 2014 #1 With linux File.DirApp seems return the directory where is launched the jar file, not the jar directory for instance the jar is under /home/myuser/mydirectory1/mydirectory2/myjar.jar If I start the jar with double click. Code: Copy TextWriter1.Initialize(File.OpenOutput(File.DirApp, "Text.txt", False)) create the file Text.txt under /home/user/ If I run the jar with this command: Code: Copy cd /home/myuser/mydirectory1/mydirectory2/ java -jar myjar.jar the file is created under /home/myuser/mydirectory1/mydirectory2 If I run the jar with this command: Code: Copy cd /home/myuser/mydirectory1 java -jar mydirectory2/myjar.jar the file is created under /home/myuser/mydirectory1 SORRY the response is in this thread http://www.b4x.com/android/forum/th...not-jar-directory-in-linux.40138/#post-239474
With linux File.DirApp seems return the directory where is launched the jar file, not the jar directory for instance the jar is under /home/myuser/mydirectory1/mydirectory2/myjar.jar If I start the jar with double click. Code: Copy TextWriter1.Initialize(File.OpenOutput(File.DirApp, "Text.txt", False)) create the file Text.txt under /home/user/ If I run the jar with this command: Code: Copy cd /home/myuser/mydirectory1/mydirectory2/ java -jar myjar.jar the file is created under /home/myuser/mydirectory1/mydirectory2 If I run the jar with this command: Code: Copy cd /home/myuser/mydirectory1 java -jar mydirectory2/myjar.jar the file is created under /home/myuser/mydirectory1 SORRY the response is in this thread http://www.b4x.com/android/forum/th...not-jar-directory-in-linux.40138/#post-239474