如何将Java语法(仅语法)转换为C#或VB.NET [英] How to Convert Java Syntax(only Syntax) to C# or VB.NET

查看:119
本文介绍了如何将Java语法(仅语法)转换为C#或VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉再次发帖,我在这次转换中更有意思。

Java 1.8 JDK包含了java的源代码。

我想把它转换为.Net在VB.NET或C#中使用Java类(例如Java.Awt命名空间)。用户可能不需要为此安装Java。

这是必需的,因为.Net没有像ByteInputStream这样的东西。

我知道我可以使用FileStream或StreamReader,但是我在Java的ByteInputStream中找不到它们的属性。



有可能转换吗?如果有,怎么样?是否有工具只转换语法而不使用等价物?



我使用了TangibleSoftwareSolutions演示,但它将java.lang.boolean等内容替换为System.Boolean,I不需要这个。



提前致谢!

Sorry for posting again, I'm begginer in this conversion.
Java 1.8 JDK includes the source code of java.
I want to convert it to .Net to work with Java classes (Java.Awt namespace for example) in VB.NET or C#. Users might not need Java installed for this.
This is needed because .Net does not have some things like ByteInputStream.
I know i can use FileStream or StreamReader, but i can't find in them properties like in Java's ByteInputStream.

It's possible to convert? If yes, how? Is there a tool to only convert the syntax without using equivalents?

I used TangibleSoftwareSolutions demo, but it replaces things like java.lang.boolean to System.Boolean, I don't need this.

Thanks in advance!

推荐答案

这可能会给你一些指示。



https://msdn.microsoft。 com / zh-CN / library / ms973842.aspx [ ^ ]



阅读如何将Java应用程序移动到.NET Framework一节。
This may give you some pointers.

https://msdn.microsoft.com/en-us/library/ms973842.aspx[^]

Read the section, "How to Move Java Applications to the .NET Framework".


这篇关于如何将Java语法(仅语法)转换为C#或VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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