B4J Question App fails to run after installing from self contained installers tool

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I have created a UI app with B4J and complied it as a released app.

I have then used the UI apps packaging - self contained installers tool and it complies the install file fine. - https://www.b4x.com/android/forum/threads/ui-apps-packaging-self-contained-installers.56854/page-7

When I copy the install file to another computer (windows 10 64 bit) the install file installs the file fine, and when I run the .exe after installing my app, it then displays my B4J app's UI for about half a second and then is disappears.

Any one seen this happen before? If so any ideas on what could be wrong ?

When I install it on my development machine (using the same file) it runs fine.
 

DonManfred

Expert
Licensed User
Longtime User
Are you including the runtimes in your installer?
If not then the solution may be to install the Java SDK on the second Machine. Or include the runtime in your installer. The setup may grow in size.
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
Are you including the runtimes in your installer?
Shouldn't the run times be included in the self contained installer ?

When I install it on the other machine it installs a heap of files and it has a runtime file with a heap of files in it.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I´m actually not sure if i have the same installer in mind. Just looked at the #1 post and see that it is a product of AnywhereSoftware.

My question was related to this tutorial/installer maker
https://www.b4x.com/android/forum/threads/create-windows-native-executables-exe-files.35863/

I think i must revert my question as it seems not related.

Another question: How big is the generated EXE? Can you upload it here so i could test

ETA:
B4J Packager will create a single installer file that includes an embedded Java Runtime.
sounds like it does include the runtime
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
Another question: How big is the generated EXE?
The file is 45MB.
I have tried it on 2 computers so far both with the same result, except my computer it works fine since it has JDK installed and the other 2 computer don't. I thought the package installer from post 1 should make it so you don't need any further files to install. (might be wrong)
 
Upvote 0

Lahksman

Active Member
Licensed User
Longtime User
I've used B4JPackager a few time now and never encountered such behavior.
Can you find any reference about the app shutdown/crash in the Windows log files?
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
Are you writing to File.DirApp? It is a common mistake.
I read up on that and knew it shouldn't be used and should use File.DirData instead.

Find the jar in the installation folder and run it from the command line with java -jar. It will show you the error message.
Found the error. Didn't realise you could do that with a UI app. Thought it could only be done with a non-UI app. I will keep it in mind when I have issues in the future.

Strange how it works on my developer PC but not on other computers.

I found I was trying to connect to a SMTP server, but my textbox needed to be filled in before trying to connect. On AppStart I was Initializing the object, but with a blank server and port (since the user hadn't filled in the fields yet).

All good now, thanks heaps.
 
Upvote 0
Top