开发者

A tool like Jazillian to convert C to Java?

开发者 https://www.devze.com 2023-03-22 05:30 出处:网络
I see and hear a lot about Ja开发者_如何学JAVAzillian when I look for information on coverting C to Java. But I cannot find any information on what happened to this wonderful tool and where to downloa

I see and hear a lot about Ja开发者_如何学JAVAzillian when I look for information on coverting C to Java. But I cannot find any information on what happened to this wonderful tool and where to download it?

Does anyone have any insight into it? I want to download Jazillian or any other good alternative?


You can always use JNI. That way you don't have to convert anything, but rather send requests to your native code and have it return the results as data structures that you can manipulate in your Java program. this code is obviously not cross platform, but depending on the scope of your project this could be the fastest way to extend a C app with new Java code.


Supposedly Cibyl can compile C libraries into executable Java bytecode. I don't know of a specific tool to convert the C code to actual Java code, except for porting it yourself.


There's lots of tools out there. They're called programmers. You should get one of those to do it.

There isn't a one-to-one mapping between C and Java. C can do lots of stuff Java can't do (pointers spring to mind as the obvious one), and the same is true of Java. C doesn't even have classes. Any machine translation would result in terrifying code. You're far better off doing it by hand. If the project you want to translate has unit tests, you should definitely do those by hand before you translate the code under test. If not, perhaps you should write some unit tests for the code you're translating first, because otherwise you're going to screw it up.

This all assumes you have a good reason for translating code from one language to another in the first place. Keep good hold of it. Those are rare.

0

精彩评论

暂无评论...
验证码 换一张
取 消