javac package not found or does not exist

I have a project written in Java 12 (fairly new to java9+ and using modules) and I want to use jlink to create a custom runtime image. I also want to use apache.commons.cli as a 3rd party library for my project. How can I make use of automatic modules and compile in order to create a jlink image?

I am getting errors like so:

tmpcommons.climodule-info.java:3: error: package is empty or does not exist: org.apache.commons.cli
exports org.apache.commons.cli;
^
1 error

My structure is as follows:

C:.
├───.settings
├───bin
│ └───com
│ └───ngdesk
├───src
│ ├───com
│ │ └───ngdesk
│ └───out
└───target
├───classes
│ ├───com
│ │ └───ngdesk
│ ├───META-INF
│ │ └───maven
│ │ └───ngDesk-ControlApp
│ │ └───ngDesk-ControlApp
│ └───out
└───test-classes

Leave a Reply

avatar
  Subscribe  
Notify of