Is there a simple and portable way to build JNI - in particular the C components - with an automated build system such as ant
or make
(or both, with one 开发者_JAVA百科calling the other) without having to manually input things like the extension of the final library file or the path to the Java includes folder to the C compiler?
This is really the case for a build environment variable. You can default it to $(JAVA_HOME)/include and $(JAVA_HOME)/lib; I think this is I did back when I used JNI.
精彩评论