使用Eclipse开发JNI应用程序(组合Java / C ++) [英] Developing JNI applications with Eclipse (Combined Java/C++)

查看:185
本文介绍了使用Eclipse开发JNI应用程序(组合Java / C ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人成功地为Eclipse设计了一个组合的Java / C ++项目?



我想做的是很简单;

  1)编译我的Java源
2)运行Javah创建JNI接口
3)编译所有C / C ++源代码b $ b 4)链接本机共享库+打包JAR

提示甚至是真正的工程项目非常欢迎。



(Eclipse 3.5)

解决方案

像一个构建系统的工作,像 ant 。只需配置您的Java项目即可使用蚂蚁构建器。您仍然可以获得针对C ++和Java项目的语言特定支持的优点,以及项目的单击构建。


Have anyone successfully managed to setup a combined Java/C++ project for Eclipse?

What I am trying to do is quite simple;

1) Compile my Java sources
2) Run Javah to create the JNI interface
3) Compile all the C/C++ sources
4) Link native shared library + package the JAR

Hints or even real projects which work are much welcome.

(Eclipse 3.5)

解决方案

This really sounds like a job for a build system, like ant. Simply configure your Java project to use the ant builder. You would still get the benefits of language specific support for your C++ and Java projects, and, one click build of the project.

这篇关于使用Eclipse开发JNI应用程序(组合Java / C ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆