B4J Question B4JPackager says Module javafx.swing not found [solved]

Status
Not open for further replies.

Didier9

Well-Known Member
Licensed User
Longtime User
Trying the packager.
Initially it complained about not finding the javafx\javafx-jmods\ folder. By default, there is a jmods folder directly under jdk-11.0.2, so I copied it under javafx and renamed the copy javafx-jmods.
Then now it complains about Module javafx.swing not found. Here is the complete error log:
B4X:
Waiting for debugger to connect...
Program started.
B4JPackager11 Version 1.02
InputJar: C:\Users\xxxxxxx\Documents\B4J Projects\CAN232_B4J\dev\Objects\result.jar
Running: C:\Users\xxxxxxx\DOCUME~1\B4JPRO~1\B4JPAC~1\Objects\temp\FindDosPath.exe
Running: C:\Java\jdk-11.0.2\bin\jar
Package name: b4j.can232
Running: C:\Java\jdk-11.0.2\bin\jdeps
.
.
.
.
.
.
Explicitly excluded modules: [javafx.web]
Included modules: [java.base, java.desktop, java.logging, java.xml, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, java.scripting, jdk.unsupported, java.datatransfer, jdk.unsupported.desktop, jdk.jsobject, jdk.xml.dom]
Running: C:\Java\jdk-11.0.2\bin\javac
.
Running: C:\Java\jdk-11.0.2\bin\jar
.
.
Running: C:\Java\jdk-11.0.2\bin\jlink
.
.
Error: Module javafx.swing not found

That message comes from the StartMessageLoop call, so I do not know exactly what statement is causing it.

I did find the javafx.swing module under C:\Java\jdk-11.0.2\javafx\lib\javafx.swing.jar

Should I copy or move that module somewhere else?
 
Last edited:

Daestrum

Expert
Licensed User
Longtime User
It's looking for javafx.swing.jmod which should be in your C:\Java\jdk-11.0.2\javafx\javafx-jmods folder.

The javafx folder should contain



Note:
The jmods folder under jdk-11.0.2 is the java jmods not javafx-jmods.

You have to copy the entire folder hierarchy from javafx-sdk-11.0.2 to the javafx folder under jdk-11.0.2
 
Last edited:
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
I will try and explain

You downloaded (java11) sdk-11.0.2 and (javafx) javafx-sdk-11.0.2

1, Unpack the sdk to a folder
2, unpack the javafx-sdk to a different folder
3, copy javafx-sdk folder into the sdk folder
4, rename javafx-sdk-11.0.2 inside the sdk folder to javafx
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…