B4J Question [SOLVED] B4Xpages app: B4J layout file error java.lang.RuntimeException: java.io.FileNotFoundException: MainPage.bjl

peacemaker

Expert
Licensed User
Longtime User
HI, All

Already 2-3 times i have found that some B4J project (not all) give the error that cannot find the main layout file after compilation in Release mode.
Debug mode works OK.
B4A part of the B4Xpages project also compiled OK.
OpenJDK 11.
How to understand what is the trouble ?
 

peacemaker

Expert
Licensed User
Longtime User
Opps. My manual start shows:

p:\GoogleDrive\!Sources\!\TrendUtils\TrendUtils\B4J\Objects>java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) Client VM (build 25.261-b12, mixed mode, sharing)
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Looks so ! But how to install JDK11 under Win10, if B4X recommended bundle is not the installer ?
JAVA_HOME is set to the recommended OpenJDK11.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I uninstalled old Java 1.8. OpenJDK 11 unzipped again (to the same "d:\Programs\Java\jdk-11.0.1"), and it was not changed.
But manual start now gives:
d:\Programs\Java\jdk-11.0.1\bin>java -jar TrendUtils.jar
Error: JavaFX runtime components are missing, and are required to run this application
Debug mode is working OK, as usual. But not release.

Only one is clear - it's only my PC is with trouble.
Thanks to all, will google.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Thanks, does not help, app is started and the window is immediately closed. Some Java local trouble. Strange that the Debug mode is fully OK.

And more over strange that i have B4J projects that work OK in Release mode OK too right now ! Also UI apps.
 
Last edited:
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
command line using this
java --module-path ..\javafx\lib\ @"D:\Programs\B4J\release_java_modules.txt" -jar TrendUtils.jar
Thanks, Erel ! Such way - yes, app is started OK from JAR at my PC also.
But why no start (not found the Layout file) in Release mode from B4J ...
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Does it work once it is packaged?
Yes, it's started manually as you suggested from the command line and works fully OK.
I tried some other B4J projects - some starts OK in Release mode, some - no, like this. With native views, and B4Xviews, no difference... Very strange situation.
If to create the default empty projects by "File"-menu (UI and B4XPages) - they both start OK in Release mode.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
SOLVED !
Deleted "Objects" folder, and re-compilation in Release mode ... works !
 
Upvote 0