Hello. I' m using JNI for comminicate some native c++ methods. And I wanna make a distribution include this dll file to jar. How can i do this. Is there ant exam?
Thank for your answers.
I don't think it is possible to include the DLL file inside the JAR file, if that is what you mean. Windows doesn't understand JAR files by itself, so it doesn't know how to find the DLL inside the JAR file. You'll need to distribute the DLL along with your JAR file, as a separate file. If you want to make it easy for your users, you could make an installer for your program which sets it up as it should. See Open Source Installer Generators for programs that can make an installer for your program.
I don't think it is possible to include the DLL file inside the JAR file, if that is what you mean. Windows doesn't understand JAR files by itself, so it doesn't know how to find the DLL inside the JAR file. You'll need to distribute the DLL along with your JAR file, as a separate file.
I gotta disagree here. It's perfectly possible to distribute JNI libs via jar files. For example, signed jar files are the way to distribute JNI libs for use with JNLP and applets.