B4J Question [Solved] Win 10 64 Bit + Java 11, cannot run jar file.

mark35at

Well-Known Member
Licensed User
A new PC with Windows 10 pro 64 bit. I have downloaded the jdk-11.0.1.zip file and extracted it to c:\java\jdk-11.0.1\

B4J is also the newest version. I can run my app in debug mode and create the jar-file but cannot run the jar from a batch file.

The batch file:
B4X:
c:\java\jdk-11.0.1\bin\java.exe -jar gCodeSplit.jar
Both batch file and gCodeSplit.jar are in a temp directory.

The error message is:

Error: JavaFX runtime components are missing, and are required to run the application.

I have downloaded javaFX from Gluon (zip file).

How to proceed? Many thanks.
 

Erel

Administrator
Staff member
Licensed User
This is expected.

Java 11 doesn't support executable jars (for UI apps). You need to use B4JPackager11 to create an package with an embedded Java.
 

mark35at

Well-Known Member
Licensed User
Thank you for your prompt reply Erel. I missed that in the forum.

Just to complete this thread:

The B4JPackager11 can be found here. The "run.exe" was fine for me.

Don't forget to change line 8 accordingly.

B4X:
Private InputJar As String = "d:\temp\gCodeSplit.jar"
I assume I can delete the JavaFX zip file as it is not used.

Many thanks.
 

mark35at

Well-Known Member
Licensed User
The "openjfx-11.0.2_windows-x64_bin-sdk.zip" which I downloaded from Gluon. It is not required.
 
Top