有没有工具来集成Java和C ++? [英] Are there tools to integrate Java and C++?

查看:145
本文介绍了有没有工具来集成Java和C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您阅读这个问题。

我正在做这个家庭作业,需要一个GUI作为frond end与用C ++编写的后端代码集成。

I am doing this homework which need a GUI as frond end to integrate with back end code which written in C++.

我想使用java编写这个前端GUI作为其跨平台功能和强大的图形组件。

I wanna to write this front end GUI in java as its cross-platform feature and strong graphic components.

谢谢

推荐答案

Swig 效果非常好。这是一种将C / C ++绑定到各种各样的语言的手段。我有使用这个与C ++谈话的经验,有很少的悲伤。 这是关于使用Swig和Java的手册页教程让您快速进入,包括许多示例,包括Java。

Swig works very well. It's a means to bind C/C++ to a huge variety of languages. I have experience of using this to talk to C++ with very little grief. Here's the manual page on using Swig and Java together. The tutorial gets you going very quickly, with many examples including Java.

然而,我会调查将您的应用程序分为客户端/服务器体系结构,将C ++后端与Java前端分离。你将避免C ++ / Java开发和集成的痛苦=虽然你必须根据需求(例如基本的套接字/ webservice / HTTP + REST或可能的CORBA - 前者和后端本地实现一些通信协议Java并且是为跨语言通信而设计的)。

I would however investigate splitting your application into a client/server architecture, to separate the C++ backend from the Java front end. You'll avoid the C++/Java development and integration pain = although you'll have to implement some communication protocol between the front and back end depending on requirements (e.g. basic sockets / webservice / HTTP+REST or possibly CORBA - which comes natively to Java and is designed for cross-language communication).

这篇关于有没有工具来集成Java和C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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