B4J Question Inno Setup Standalone Packager Problem (SOLVED)

walterf25

Expert
Licensed User
Longtime User
Hi All, this is the first time I am attempting to create an executable file from a project I am working on, I have followed all the steps outlined here by Erel, everything seems to have been generated just fine, I can see the setup file in \My Programs folder under the name of my project, the problem is that when I launch the exe I get the following error and not sure how to solve it.

C:\windows\system32>cd bin
The system cannot find the path specified.

C:\windows\system32>java.exe @release_java_modules.txt -m b4j/com.snap.companion.main
Error: Could not find or load main class @release_java_modules.txt

C:\windows\system32>pause
Press any key to continue . . .

Has anyone came across this error before and what do I need to do to solve it, I can see the release_java_modules.txt file inside the /bin folder so not sure why I continue getting this error, the application doesn't even start when I try launching it. The application works just fine if I launch the .jar file.

Walter
 

walterf25

Expert
Licensed User
Longtime User
Before you run the Inno script, the exe file inside build folder is working?
Actually I just got it working, the problem was that I was using the File.DirApp Directory to store some files that are downloaded and some other files needed to run some custom scripts, After changing the File.DirApp to Xui.DefaultFolder the release_java_modules.txt file can be accessed with no problem.

Thanks for your help!

Walter
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
File.DirApp Directory
If you use this, during development (debug), it is referring to Objects folder. In production (released), it is referring to bin folder. You may want to use File.MakeDir if the folder is not existed.
B4X:
File.MakeDir(File.DirApp, "file.txt")

Edit: But it is recommended to use Xui.DefaultFolder because it will be writable.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Edit: But it is recommended to use Xui.DefaultFolder because it will be writable.
Which is why I went with Xui.DefaultFolder ?
 
Upvote 0
Top