Need help setting up Java 13 with JavaFX

bugmagnet

Bruce Axtens

Posted on December 19, 2019

Need help setting up Java 13 with JavaFX

Over on the B4J site they encourage the use of Java 11 and have a zip file containing a full Java 11 with JavaFX zip available.

I'd like to use Java 13. I've tried to create a Java 13 folder structure like their Java 11 one, with javafx in the root, viz

>dir jdk-11.0.1 /b
bin
conf
include
javafx
jmods
legal
lib
release
Enter fullscreen mode Exit fullscreen mode

However in their javafx folder there's a javafx-jmods folder with some *.jmod files in it, viz

javafx.base.jmod
javafx.controls.jmod
javafx.fxml.jmod
javafx.graphics.jmod
javafx.media.jmod
javafx.swing.jmod
javafx.web.jmod
Enter fullscreen mode Exit fullscreen mode

My downloaded-from-Oracle javafx didn't include a javafx-jmods folder and no *.jmod files. How are these generated?

All clues gratefully received.

LATER

jmods are here. Didn't see them there last time.

LATER AGAIN

Okay, over that hurdle. Still running. Still getting the following out of B4J:

B4J Version: 8.00
Java Version: 8
Parsing code.    (0.00s)
Building folders structure.    (0.01s)
Compiling code.    (0.05s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
Compiling generated Java code.    Error
src\b4j\example\main.java:7: error: package javafx.application does not exist
public class main extends javafx.application.Application{
                                            ^
1 error
only showing the first 1 errors, of 6 total; use -Xmaxerrs if you would like to see more

javac 13.0.1
Enter fullscreen mode Exit fullscreen mode

LATER SAME DAY

I've written into the forum for B4J the following

@Erel where do I specify the -Xmaxerrs setting? I want to see more errors. I'm referring to the window that says, "showing the first 1 errors, of 6 total; use -Xmaxerrs if you would like to see more"

Also, if I wanted to emit some java into the output stream, is there a mechanism to do so? Currently I'm wondering if I need to embed an explicit import statement into Objects\src\b4j\example\main.java

I've duplicated the directory structure as much as possible between v11 and v13. Still nothing.

I've put a zip of the Java 13 + JavaFX folder into my Dropbox, just in case anyone wants to compare it with a Java 11 install and tell me what I missed.

FINALLY

B4J does not support Java 13. It only supports Java 11. Java 11 is a Long-Term Support version. Java 13 isn't. You can use Java 13 but not with JavaFX. If you want JavaFX, the only route is with Java 11.

💖 💪 🙅 🚩
bugmagnet
Bruce Axtens

Posted on December 19, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related