I use the jssc package to access serial port. I added it to the main module
module DeskCheck {
requires java.desktop;
requires java.logging;
requires jssc;
}
But I believe I am doing it wrong, because there is an error saying that module does not exist.
Creating jlink image in dist\jimage/.
Executing: C:\Program Files\jdk-12.0.2\bin\jlink.exe --module-path dist\DeskCheck.jar;C:\Program Files\jdk-12.0.2\jmods --add-modules DeskCheck --output dist\jimage --compress=2
Error: Module jssc not found, required by DeskCheck
Question taken from Stack Overflow in Portuguese:
Do you mean jssc from this repository https://github.com/scream3r/java-simple-serial-connector?
Because this library does not expose any module: https://github.com/scream3r/java-simple-serial-connector/search?q=module&unscoped_q=module
You cannot require a module which does not exist. The owner must also have a file called
module-info.javawith the contentmodule jssc{...}