I want to add external libraries needed by my project to the custom runtime image.
I use the following external libraries in my project: vlcj.jar, vlcj-javafx.jar
For vlcj.jar to work I also need to add external libraries: jna.jar, jna-platform.jar, vlcj-natives.jar
If I rewrite my application so that I don't need to use vlcj.jar and vlcj-javafx.jar, then the custom runtime image creation line looks like this:
jlink --no-header-files --no-man-pages --compress=2 --strip-debug --module-path 'path/to/javafx-jmods-15.0.1' --add-modules javafx.controls,javafx.web --output /path/to/RuntimeImage
Then I create the jar of my application:
cd path/to/myapp
jar cvfe path/to/myApp.jar MainClass *.*
Then I add myApp.jar to the RuntimeImage and run the app with:
cd path/to/RuntimeImage
path/to/RuntimeImage/bin/java -jar myApp.jar
The application starts up. Things are good.
The only bad thing is that it works without VLCJ. How can I add external VLCJ libraries to the custom runtime image and run my application with it?