用于将非Java转换为Java源的工具 [英] Tools for converting non-Java into Java source

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

问题描述

有没有什么好的工具可以自动将非Java源代码转换为Java源代码?

Are there any good tools out there for automatically converting non-Java source code into Java source?

我不期待完美的东西,只是为了得到最坏的的咕噜工作出来了。

I'm not expecting something perfect, just to get the worst of the grunt work out of the way.

我想有一个滑动的难度。 C#应该比较容易(只要你忽略所有的库)。 (写得好)C ++不是那么糟。 C需要做一点OO。 (静态类型)功能语言可能容易grok。动态OO语言可能需要非本地分析。

I guess there is a sliding scale of difficulty. C# should be relatively easy (so long as you ignore all the libraries). (well written) C++ not so bad. C requires making a little OO. (Statically type) functional languages may be easy to grok. Dynamic OO languages may require non-local analysis.

推荐答案

可以尝试的一件事是找到一个Java字节码编译器(有针对各种语言的JVM编译器),然后使用像Jad这样的反编译器将字节码反编译回Java。

One thing you can try is find a Java bytecode compiler for the language you're talking about (there are JVM compilers for all kinds of languages) and then decompile the bytecode back into Java using a decompiler like Jad.

这充满了危险。重新生成的代码将吸收,并且可能无法读取。

This is fraught with peril. The regenerated code will suck and will probably be unreadable.

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

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