I'd like to create a Java 9 runtime image that contains 3rd party jars. I have made a simple Java project (let's call this Example
) to call a utility jar (let's call this ExampleUtil.jar
). Example
contains the module-info.java
in the src
directory and runs fine in Eclipse (I had added ExampleUtil.jar
as a module dependency).
If I call:
jlink -v
--module-path "C:\Program Files\Java\jdk-9.0.4\jmods";C:\Temp
--add-modules com.example.steven
--output C:\Temp\image.steven
--launcher launch=com.example.steven/com.example.steven`
...I get the error message:
Error: module-info.class not found for ExampleUtil module
Is there a way to create a runtime image using jars that aren't modules?