B4J Question JFX matter? B4J with sdk11

davide69

Member
Licensed User
Longtime User
Hello,

For a couple of days, I have been struggling with Jar files and exe (building an integrated package option B4J - 9.80).
1. The exe file cannot be opened, and I got this message from the debug run.


2. The build inside the B4J works and runs my project without any problem.
3. The SDK 11 is present in my C: folder and downloaded from your web (JFX should be present)
4. If I run the exe file from the integrated package it starts for a moment and closes.
5. If I try to open the Jar inside the object it also does not run and I get an Error: JavaFX runtime components are missing, and are required to run this application.
6. If I use Java SDK 8 then point 5 is solved but I would like to use the integrated package option which does not run with sdk 8.

I went through the forum message, but I did not find a real solution.
Anybody here has the same situation or solutions?
Thank in advance.

Davide
 

Magma

Expert
Licensed User
Longtime User
Do you copy the whole folder of build.. to the target folder.. and then run exe and not running?
 
Upvote 0

davide69

Member
Licensed User
Longtime User
Hello,

thanks for pointing to the right direction, the EXE file works after following the advice in the link, it means:

1. Added a line in my program #CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ jssc.dll
2. Added the pointed file jssc.dll to the project folder.

I still have the matter that the Jar file does not open from the object folder, maybe related to the jre which open the jar, some windows matter?
 
Upvote 0

davide69

Member
Licensed User
Longtime User
When I double click on the ...objects\project.jar (which is generated from the B4J build) is not opening ...
Or from cmd prompt
java -jar project.jar
Error: JavaFX runtime components are missing, and are required to run this application
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Double clicking a jar only works with a Java 8 JRE installation.

The other error seems self-explanatory.
 
Upvote 0

davide69

Member
Licensed User
Longtime User
Thanks for pointing me to your post, I think now everything looks clearer to me.
I try to recap, the JAR file in the objects folder does not open with the JRE 8 since it does not contain the JavaFx runtime, right?
So, your small app will do the job to add JavaFX to it?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
So, your small app will do the job to add JavaFX to it?
No. It is for Java JREs later than 8 where double clicking a jar does not work as it did with Java 8 because their installation does not set various registry and path entries. This is by design. The Java JREs will need to include JavaFx. The OpenJDK 11 linked to in the B4J product page has OpenJFX included. Elsewhere in the forum are posts telling you how to add JavaFx to other OpenJDK downloads.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…