B4J Code Snippet running jar in jdk11

The following works for me and is quite simple, for applications to run in the desktop where I also develop.
I downloaded from bellsoft the last version of jdk, 12.0.2 and put it next to the jdk-11.0.1 . B4j does not run on it (yet ?).
I create a batch file (text, extension = .bat) for the application and put it in the objects dir of the app (that is the natural place for it), example for freecell, after compiling it in jdk 11:
B4X:
D:
cd D:\B4J\Freecell7_11\Objects
c:\java11\jdk-12.0.2\bin\java -jar Freecell.jar

"C:\java11" is the place for the jdk 11 and 12 in my computer.

Now I create a shortcut to the batch file and put it on the desktop and attach the right icon for it.
That is all !

Note: it does not work if I use 11.0.1 in the batch file, I don't know why.

A command window opens when the batch file starts and you get some debug info on it, like I get this in one case:
D:\B4J\Books_2_11\Objects>c:\java11\jdk-12.0.2\bin\java -jar Books.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by b4j.example.customlistview (file:/D:/B4J/Books_2_11/Objects/Books.jar) to method com.sun.javafx.scene.control.skin.Utils.computeTextHeight(javafx.scene.text.Font,java.lang.String,double,javafx.scene.text.TextBoundsType)
WARNING: Please consider reporting this to the maintainers of b4j.example.customlistview
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 
Last edited:
Top