This content has been marked as final.
Show 1 reply
-
1. Re: Adding a shared object to Shrinkwrap...how to do it ???
kpiwko Apr 4, 2014 3:37 AM (in response to flowerman59)Hi Alan,
how would you run the application without ShrinkWrap, e.g. from command line? According to this page - http://www.chilkatsoft.com/java-loadLibrary-Linux.asp - by default, .so is not a part of JAR archive.
However, there are approaches how to put .so into the jar, such as here - http://frommyplayground.com/how-to-load-native-jni-library-from-jar/. In such case, you can use following call:
ShrinkWrap.create(JavaArchive.class).add(new FileAsset(new File("/path/to/file.so")), "/native/file.so");
An your file can be retrieved from classpath(jar) at /native/file.so.
HTH,
Karel