Menu
This project aims to convert C++ code to high level Java source code. Where that is not possible, a TODO should appear in the generated source code.
Status
The project is about three quarters of the way to an initial release. The below items will not be handled by the initial release:
Everything else should work with the initial release.
Example Code
The following lines give an indication of what generated code using pointers looks like.
Required JARs
This fork will build with Maven. Eclipse CDT is notin Maven central, or any repository I could find, butfor your convenience, private copies ofcertain JARS are shipped in the lib/ directory:
Please note these are from a separate project with separate licenses.
Objective C To Java Converter Online
Historical required JARs:
These are the JAR files I use to get this code to run.They are from Eclipse Juno (4.2.x) and CDT 8.1.1 for Eclipse Juno.Additionally, jOOR is required by the runtime template handling code.
License
This project is licensed under the Apache license. Contoh salam pembuka untuk berita televisi. The CDT walking code is based loosely on code I found (and lost the url) on the web (also licensed under the Apache license).
TODO
This is an incomplete and fluid list of items that need doing before the initial release.
Any tools to convert C code into Java code? I am interested in converting this code into Java:
Aymon FournierAymon Fournier
1,9711111 gold badges3131 silver badges5555 bronze badges
closed as too broad by rene, Madara Uchiha♦Nov 29 '15 at 12:12
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Talk about it with Threston, and then look at the door. Neverwinter nights side quests list. You will find blood there. Threston will give you 1500 and you will be asked to find a thief. If you have a high Spellcraft skill then you will find that the chalice is hidden there.
7 Answers
Have you considered using JNI instead of bothering doing the translation from C to Java?
CatchwaCatchwa
5,07722 gold badges2727 silver badges5252 bronze badges
C Code In Java
Your best bet is to rewrite the code.
Any automated conversion would, at best, yield poor-quality and unmaintainable code.
The C view of the world does not mix well with the Java view of the world. If you really want to compile to a form executable by Java, have a look at NestedVM - http://nestedvm.ibex.org/ - which is a cross compiler compiling to a MIPS-dialect which can then easily be 'run' in Java either through interpretation or by conversion to actual bytecode reflecting the original MIPS-instructions.
I would recommend getting a Java version of the code.
Thorbjørn Ravn AndersenThorbjørn Ravn Andersen
58.8k2525 gold badges153153 silver badges294294 bronze badges
There used to be tools called Ephedra, Convert2Java and C2J++. But they didn't really work and are no longer available. This leaves three companies offering automatic C to Java translation in the range of unusable, helpful and good:
Convert C Program To Php Online
Here the created class from mtSystems (unaltered):
user3669782user3669782
I used C++ to Java converter to convert above code. It wont be 100% correct but at least it gives fare idea as to what needs to be done.
Sachin BhansaliSachin Bhansali
58211 gold badge55 silver badges1212 bronze badges
The question is asking 'any tool?', so here is a tool.
Please don't downvote just because you don't like tools.
I tried a C-to-Java conversion tool called 'Novosoft C2J'. Verdict:
I managed to convert a C file with few dependencies, but had to 'pre-process' it by copy-pasting the content of header files to headers, because C2J won't let me select .h files for inclusion in a project.
Translated code is static, with strange 'nextlevel()' and 'prevlevel()' calls.
Some translated code needs manual work, for instance: UndefFcs.cisnan([..]) How to change your recycle bin icon windows 7.
Conclusion: Buggy tool, but it might be the case that there is no better tool.
Nicolas RaoulNicolas Raoul
34.9k4848 gold badges164164 silver badges300300 bronze badges
I realized I never posted my solution
In Android Activity:In unecm.c add:Aymon FournierAymon Fournier
1,9711111 gold badges3131 silver badges5555 bronze badges
Not the answer you're looking for? Browse other questions tagged javactranslation or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |