Java to C/C++ converter

A

Andreas Nauerz

Hallo,

does anyone know a program able to convert Java sourcecode to C or C++
sourcecode ?

Thanks.

Regards...

P.S.: I am only using standard classes of Java 1.3.1 SE
 
D

Derek

Hallo,
does anyone know a program able to convert Java
sourcecode to C or C++ sourcecode ?

Thanks.

Regards...

P.S.: I am only using standard classes of Java 1.3.1 SE

I don't think such an animal exists. There are lots
of things in Java that don't map to standard C++ at
all, like threading, garbage collection, and a lot of
library classes.

I suggest you brush up on the differences and do it by
hand: http://icie.cs.byu.edu/cs240/javac.html
 
P

Pete Becker

Leor said:
One of the ways you can use Dinkumware's JFE Cross Compiler:
http://dinkumware.com/javatocv3.html
is to have it produce C source code.

That's actually EDG's compiler, with our library. But I wouldn't really
call it a converter -- the resulting C code is nearly unreadable. A C
compiler can understand it, but most programmers would quickly run out
of patience trying to read it.
 
L

Leor Zolman

That's actually EDG's compiler, with our library. But I wouldn't really
call it a converter -- the resulting C code is nearly unreadable. A C
compiler can understand it, but most programmers would quickly run out
of patience trying to read it.

Ok, Pete, thanks for the clarification. I wasn't sure exactly how pretty
the output of the EDG/Dinkum package would be, but then, the OP didn't
specifically ask for /pretty/ C code as output ;-)
-leor
 
P

Pete Becker

Leor said:
Ok, Pete, thanks for the clarification. I wasn't sure exactly how pretty
the output of the EDG/Dinkum package would be, but then, the OP didn't
specifically ask for /pretty/ C code as output ;-)

Actually, the output looks more like LISP: Lots of Infernal Stupid
Parentheses.
 
L

Leor Zolman

Actually, the output looks more like LISP: Lots of Infernal Stupid
Parentheses.

I hope you're not it for the Dinkum PR/Marketing Department ;-)
-leor
 
P

Pete Becker

Leor said:
I hope you're not it for the Dinkum PR/Marketing Department ;-)

Nope. <g> Just the one who ended up stepping through too much of that
generated code to figure out why things were crashing.
 
Joined
Feb 12, 2010
Messages
1
Reaction score
0
I could suggest a tool called JCGO (ivmaisoft.com/jcgo/) which is a Java source to C translator. The produced C code is readable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top