从Java转换 [英] converting from Java

查看:48
本文介绍了从Java转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java应用程序,我希望移植到c ++,以便将
与现有的c ++应用程序集成。有没有人知道有任何工具需要帮助?


我发现microsft有一个java-> c#convert,但java app有类

做多个子类化,这似乎不适用于C#。

有没有把C#移植到c ++?

谢谢...查理

I have an application in Java that I would like to port to c++ to
integrate with existing c++ app. Is anyone aware of any tools to help?

I found microsft has a java->c# convert, but the java app has class
that do multiple subclassing and this doesn''t seem to work in C#.
Is there any to port C# to c++?
thanks...charlie

推荐答案

cs ***** @ yahoo.com 写道:
cs*****@yahoo.com wrote:
我有一个Java应用程序,我想将其移植到c ++以与现有的c ++应用程序集成。是否有人知道有任何工具可以提供帮助吗?


你的意思是托管C ++?您无法将Java移植到本机C ++

即使您的意思是mC ++,也无法自动移植

Java to C ++ AFAIK,因为用C ++表达Java语言和API的更高级别结构并不容易。


您需要什么样的集成?也许你可以使用标准Java或.NET InterOp服务使用JNI

,如果你将Java转换为J#(只要您的Java代码

符合Java 1.1)。

我发现microsft有一个java-> c#转换,但java应用程序
有一个类可以进行多个子类化,这不会'' t
似乎适用于C#。


C#是Java语言的超集(但是对于Java5中引入的一些

功能),所以你总是可以移植Java

C#的源代码(对于Java API来说并不总是这样。

调用)。

有没有将C#移植到c ++?
I have an application in Java that I would like to port
to c++ to integrate with existing c++ app. Is anyone
aware of any tools to help?
Do you mean managed C++? You can not port Java to native C++
because most Java features require a VM to be supported.
Even if you mean mC++, there is no way to automatically port
Java to C++ AFAIK because it is far from easy to express the
higher level constructs of the Java language and API in C++.

What kind of integration do you need? Maybe you can use JNI
with standard Java or the .NET InterOp services if you port
Java to J# (which is a breeze as long as your Java code
conforms to Java 1.1).
I found microsft has a java->c# convert, but the java app
has class that do multiple subclassing and this doesn''t
seem to work in C#.
C# is a superset of the Java language (but for some of the
features introduced in Java5), so you can always port Java
source code to C# (this is not always true for Java API
calls).
Is there any to port C# to c++?




不是我知道的。即使用C#表示的所有内容都可以用C ++表示,也不能保留一些更高级别的b $ b级结构,就像使用Java一样。

-


// Alessandro Angeli

// MVP ::数字媒体

//点angeli在psynet dot net



Not that I''m aware of. Even if everything that can be
expressed in C# can also be expressed in C++, some higher
level constructs can not be preserved, just like with Java.
--

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


Alessandro Angeli [MVP :: DigitalMedia]写道:
Alessandro Angeli [MVP::DigitalMedia] wrote:

你的意思是托管C ++?您无法将Java移植到本机C ++,因为大多数Java功能都需要支持VM。
即使您的意思是mC ++,也无法自动将Java移植到C ++ AFAIK,因为它在C ++中表达Java语言和API的更高级别构造远非易事。

Do you mean managed C++? You can not port Java to native C++
because most Java features require a VM to be supported.
Even if you mean mC++, there is no way to automatically port
Java to C++ AFAIK because it is far from easy to express the
higher level constructs of the Java language and API in C++.



我不知道C#和Java,但是你可以提供一个例子一个无法用C ++表达的Java

结构?


-

Ioannis Vranos


I do not know C# and Java, but may you provide an example of a Java
construct that cannot be expressed in C++?


--
Ioannis Vranos


Ioannis Vranos写道:
Ioannis Vranos wrote:
Alessandro Angeli [MVP :: DigitalMedia]写道:
Alessandro Angeli [MVP::DigitalMedia] wrote:

你的意思是托管C ++?您无法将Java移植到本机C ++,因为大多数Java功能都需要支持VM。
即使您的意思是mC ++,也无法自动将Java移植到C ++ AFAIK,因为它在C ++中表达Java语言和API的高级构造并不容易。

Do you mean managed C++? You can not port Java to native C++
because most Java features require a VM to be supported.
Even if you mean mC++, there is no way to automatically port
Java to C++ AFAIK because it is far from easy to express the
higher level constructs of the Java language and API in C++.



我不知道C#和Java,但是你可以提供一个例子一个无法用C ++表达的Java
结构?



I do not know C# and Java, but may you provide an example of a Java
construct that cannot be expressed in C++?




无法轻易表达匿名内部类。


Tom



Anonymous inner classes can''t easily be expressed.

Tom


这篇关于从Java转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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