B4J Question How to change or find the SQLite TEMP directory?

jmon

Well-Known Member
Licensed User
Longtime User
Hello,

I have some issues with a Windows server machine. The SQLite "temp" directory was not created automatically, and these were the errors caused by KVS:

I found out by redirecting the STDOUT and reading on internet that the error was caused by the TMP dir not existing (clients deleted the content of the temp folder). I guess the app didn't have the permission to create the directory or something like that.

The file that SQLite was trying to access is this one:
C:\Users\ADMINI~1\AppData\Local\Temp\1\sqlite-unknown-691ab85e-aa2e-4acb-9718-8c5e980df1df-sqlitejdbc.dll

So the missing directory was the "1".
I created the directory manually and it worked.

How can I check if this folder exists? So I could create it if missing.

Thanks
Jmon


NOTE: this is not the same directory as returned by:
B4X:
GetEnvironmentVariable("java.io.tmpdir", "n/a")
 

jmon

Well-Known Member
Licensed User
Longtime User
Thanks, in my case I use the JavaPackager to pack in an Exe file. I guess I should add:
B4X:
-BjvmProperties=java.io.tmpdir="temp"
to the packager options right?

B4X:
   args.AddAll(Array ("-deploy", "-v", "-srcdir", TextAddDir.Text, "-argument", txtJar.Text, "-native", packageExtension, _
        "-BsystemWide=true", "-BjvmOptions=-Xmx512m", "-title", txtTitle.Text, "-name", txtName.Text, "-outdir", workingFolder, _
        "-outfile", "1.exe", "-BappVersion=" & txtVersion.Text, "-appclass", appClass, _
        "-Bidentifier=" & appClass, "-BmenuHint=true", "-Bwin.menuGroup=Jmon", "-Bvendor=Jmon", _
        "-BlicenseFile=LICENSE.rtf", "-srcfiles", "Master.jar;LICENSE.rtf;updater.sh;Slave.jar;version.txt"))

Thanks a lot
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…