I'm using Java 11 and JavaFX 11. So my JavaFX project contains module-info.class with lines like:
module checker {
requires javafx.fxml;
requires javafx.controls;
requires TextInputProgram; // this is external jar that I added in modular JavaFX project
opens sample;
exports sample; // package of program
}
And I want to build artifacts to get jar including external jar and javafx program via Java 11 following this tutorial.
The problem is:
when I'm writting the command:
dir /s /b src\*.java > sources.txt & javac --module-path %PATH_TO_FX% -d mods/checker @sources.txt & del sources.txt
or
dir /s /b src\*.java > sources.txt & javac --module-path %PATH_TO_FX_MODS% -d mods/checker @sources.txt & del sources.txt
I'm getting:
D:\IdeaProject\checker>dir /s /b src\*.java > sources.txt & javac --module-path %PATH_TO_FX_MODS% -d mods/checker @sources.txt & del sources.txt
D:\IdeaProject\checker\src\module-info.java:4: error: module not found: TextInputProgram
requires TextInputProgram;
^
1 error
Before it I set two paths succesfully:
set PATH_TO_FX="path\to\javafx-sdk-12.0.2\lib"
set PATH_TO_FX_MODS="path\to\javafx-jmods-12.0.2"
Can someone explain how to get Jar that will include JavaFX program and external jar using Java 11?