简体   繁体   English

JNI-如何为OSGI捆绑包生成头文件

[英]JNI - How to generate header files for OSGI bundle

I made several very simple examples with Java and C using JNI. 我使用JNI使用Java和C编写了几个非常简单的示例。 Usually after every Java code compilation C header files must be "extracted" and included into the C source code file and then compiled using gcc. 通常,在每次Java代码编译之后,都必须“提取” C头文件并将其包含在C源代码文件中,然后使用gcc进行编译。 My question is how I can generate C header files from OSGI bundle with Java code? 我的问题是如何使用Java代码从OSGI捆绑包生成C头文件?

Can this be done during the bundle compilation time? 可以在捆绑包编译期间完成吗?

You could automate header extraction with the Maven JAVAH plug-in . 您可以使用Maven JAVAH插件自动执行标头提取。 It should even be possible to use wild-cards to process an entire package. 甚至应该可以使用通配符来处理整个程序包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM