Jlink is more or less like an Android APK, without sizing constraints.
Essentially it concatenates all classes and app resources into a single big file (lib/modules).
Shared libraries should be placed directly under lib directory.
The exception is, if you use a shared lib as a classpath resource that will be programatically loaded, eventually it will have to be copied to some path in order to System.loadLibrary() work. In this case the binary will be embedded into lib/modules like any other resource, which will be resolved as a regular java program would do.
View all comments
Show parent comment
3
u/flawless_vic Jan 03 '25
Jlink is more or less like an Android APK, without sizing constraints.
Essentially it concatenates all classes and app resources into a single big file (lib/modules).
Shared libraries should be placed directly under lib directory.
The exception is, if you use a shared lib as a classpath resource that will be programatically loaded, eventually it will have to be copied to some path in order to System.loadLibrary() work. In this case the binary will be embedded into lib/modules like any other resource, which will be resolved as a regular java program would do.