2

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:

https://pt.stackoverflow.com/questions/416758/como-adicionar-um-library-no-modulo-principal-module-info-java

1 Answers1

0

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.java with the content module jssc{...}

Doompickaxe
  • 194
  • 1
  • 9