I love the 'Build Standalone Package' option. But I have to run the "run_debug.bat" batch file to run the app. If I run the .EXE, the app momentarily flashes on the screen then quits. It runs perfectly from the batch file.
Why is this? How do I find out why it is quitting? How can I fix it?
1. Do you have any specific reason for using old B4J version?
2. Did you try to run exe file from Command Prompt? If yes, did you see any error message after app crash?
1. Do you have any specific reason for using old B4J version?
2. Did you try to run exe file from Command Prompt? If yes, did you see any error message after app crash?
I'm using jStringUtils, jSQL, Json, jOKHttpUtils2, jFX, jCore, JavaObject, DBUtils, and B4XPages.
I've setup the IDE and project on two different computers also, just to test it, and same result.
Is there some kind of internal debugging I could turn on? The console Log has worked so well I haven't tried anything else. But I don't get any sort of error or warning or anything when I run the .EXE, it just quits.
Hm. Ususally the run_debug.bat will show what is going on. Can you write an extra file to log at which point your app crashes (just do a write a some points)? At least you get closer to the problem.
PS: Did you try to run it as an administrator? Where do you start the package from (copy it to the desktop or just C: for a test)
...If not trying at the same PC B4J compiling.. may be need runtimes of .net 4.5+ ...better 4.8...
and the most important... at pc compiling - do have installed OpenJava ? ( Recommended: OpenJDK 11 + OpenJFX 11: download link. )
and ofcourse configured at: Tools > Configure Paths.
read "Installation" here: https://www.b4x.com/b4j.html
... If not having errors as you are saying... it seems problem with directories + reading files from them ---> try using file.dirapp and target to the right paths... for start target at specific directories to see if pass the errors... and try to fix with file.dirapp/dirdata/assets... have in mind file.combine...
have in mind is better using slash like linux/unix... for example "c:/b4j/projects/temp"
...If not trying at the same PC B4J compiling.. may be need runtimes of .net 4.5+ ...better 4.8...
and the most important... at pc compiling - do have installed OpenJava ? ( Recommended: OpenJDK 11 + OpenJFX 11: download link. )
and ofcourse configured at: Tools > Configure Paths.
read "Installation" here: https://www.b4x.com/b4j.html
... If not having errors as you are saying... it seems problem with directories + reading files from them ---> try using file.dirapp and target to the right paths... for start target at specific directories to see if pass the errors... and try to fix with file.dirapp/dirdata/assets... have in mind file.combine...
have in mind is better using slash like linux/unix... for example "c:/b4j/projects/temp"
I hadn't thought of checking that, but I am using .Net 4.8.
Yes, I'm using OpenJDK11 + OpenJFX. JavaC is: C:\java\jdk-11.0.1\bin\javac.exe
Yes, I get no console errors at all when I run it from the .bat file. But it just won't run from the .exe.
I'd actually had everything running in File.Dirapp for testing, which in my environment is D:\devel\MyApp\B4J\Objects\temp\build. I copied it all out of there to run somewhere else, thinking there might be a rights issue, but it didn't help.
Hm. Ususally the run_debug.bat will show what is going on. Can you write an extra file to log at which point your app crashes (just do a write a some points)? At least you get closer to the problem.
PS: Did you try to run it as an administrator? Where do you start the package from (copy it to the desktop or just C: for a test)
You know, that is my old standby for debugging. Just inserting "Got here!" with a line number. I thought I was just missing some directive or Packager Property, as others have suggested, but I think I'm going to have to do that since nothing has panned out. I'll try it and post the results. Thanks!