Bug? File.DirApp with linux

scrat

Active Member
Licensed User
Longtime User
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.
B4X:
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:
B4X:
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:
B4X:
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
 
Top