B4J Question Integrated B4JPackager11 builds the project, but the resulting exe does not start [SOLVED]

red30

Active Member
Licensed User
I did everything according to the instructions:
I downloaded OpenJDK 11 and indicated the path to the javac.exe file for the program
The program works in both release and debug fashion
I press build "standalone package" everything goes without errors.
As a result, I try to run the exe file and nothing happens, more precisely, in the Windows task manager (the processes section), I see how the exe file is launched and immediately disappears after a second. I tried to run it as administrator - the result is the same. Through InstallerScript-Template I tried to create an installation file, install it (I tried it both on my PC (win7) and on another (win10)) - the result is the same.
Why is this happening? What am I doing wrong?
I found what the problem is:
I am using jAudioClip library and when in "Process_Globals" I add a file, for example:
B4X:
Private Sound As AudioClip = AudioClip_Static.NewAudioClip2(File.DirAssets,"alarm.wav")
Then I get this Integrated B4JPackager11 error
 
Last edited:

JohnJ

Member
Licensed User
Longtime User
I did everything according to the instructions:
I downloaded OpenJDK 11 and indicated the path to the javac.exe file for the program
The program works in both release and debug fashion
I press build "standalone package" everything goes without errors.
As a result, I try to run the exe file and nothing happens, more precisely, in the Windows task manager (the processes section), I see how the exe file is launched and immediately disappears after a second. I tried to run it as administrator - the result is the same. Through InstallerScript-Template I tried to create an installation file, install it (I tried it both on my PC (win7) and on another (win10)) - the result is the same.
Why is this happening? What am I doing wrong?
I found what the problem is:
I am using jAudioClip library and when in "Process_Globals" I add a file, for example:
B4X:
Private Sound As AudioClip = AudioClip_Static.NewAudioClip2(File.DirAssets,"alarm.wav")
Then I get this Integrated B4JPackager11 error
Did you copy the Files folder into the build folder? The Packager does not do that for you. I'm also having an issue with changing the icon in the task bar. So far no luck.
 
Upvote 0

red30

Active Member
Licensed User
Did you copy the Files folder into the build folder? The Packager does not do that for you. I'm also having an issue with changing the icon in the task bar. So far no luck.
Don't get it ... Just copy the "Files" folder to "... \ Objects \ temp \ build"?
Run the debug.bat and catch where the error is coming from
I tried to run it, but there is no error displayed when starting the exe file itself.
Here is a screenshot of what is displayed there:
run_debug.png
 
Upvote 0

red30

Active Member
Licensed User
Resolved! I found the answer in this thread.
The file cannot be located in DirAssets, so when the program starts, I just copy it to DirApp:
B4X:
    If File.Exists(File.DirApp,"alarm.wav")=False Then
        File.Copy(File.DirAssets,"alarm.wav",File.DirApp,"alarm.wav")
    End If
 
Upvote 0
Top