[Ant]How to add .so file into a jar and use it within jar(set the java.library.path)?
问题 all. I'm trying to make a bundle jar containing Sigar library, which uses a .so as native support. I've zipped the Sigar into my.jar, when I run it from cmd, I have to type like this: java -jar -Djava.library.path=~/path/to/lib/contains/so my.jar Yes this works, BUT I want to build a bundle jar , that, to say, contains .so into jar and use it within the jar. So my question is: how to set the java.library.path pointing to .so files within that jar . Finally, I want to make it like java -jar my