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

Discussion in 'B4J Questions' started by mark35at, Apr 18, 2019.

  1. mark35at

    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:
    Code:
    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.
     
  2. Erel

    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 likes this.
  3. mark35at

    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.

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

    Many thanks.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Which zip?
     
  5. mark35at

    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.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice