Java to C/C++ converter

Discussion in 'C++' started by Andreas Nauerz, Jun 1, 2004.

  1. 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
     
    Andreas Nauerz, Jun 1, 2004
    #1
    1. Advertising

  2. Andreas Nauerz

    Derek Guest

    > 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
     
    Derek, Jun 1, 2004
    #2
    1. Advertising

  3. E. Robert Tisdale, Jun 1, 2004
    #3
  4. Andreas Nauerz

    Leor Zolman Guest

    On Tue, 01 Jun 2004 22:08:55 +0200, Andreas Nauerz <> wrote:

    >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


    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.
    -leor


    --
    Leor Zolman --- BD Software --- www.bdsoft.com
    On-Site Training in C/C++, Java, Perl and Unix
    C++ users: download BD Software's free STL Error Message Decryptor at:
    www.bdsoft.com/tools/stlfilt.html
     
    Leor Zolman, Jun 1, 2004
    #4
  5. Andreas Nauerz

    Pete Becker Guest

    Leor Zolman wrote:
    >
    > 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.

    --

    Pete Becker
    Dinkumware, Ltd. (http://www.dinkumware.com)
     
    Pete Becker, Jun 2, 2004
    #5
  6. Andreas Nauerz

    Leor Zolman Guest

    On Tue, 01 Jun 2004 19:37:43 -0400, Pete Becker <> wrote:

    >Leor Zolman wrote:
    >>
    >> 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.


    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


    --
    Leor Zolman --- BD Software --- www.bdsoft.com
    On-Site Training in C/C++, Java, Perl and Unix
    C++ users: download BD Software's free STL Error Message Decryptor at:
    www.bdsoft.com/tools/stlfilt.html
     
    Leor Zolman, Jun 2, 2004
    #6
  7. Andreas Nauerz

    Pete Becker Guest

    Leor Zolman wrote:
    >
    > 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.

    --

    Pete Becker
    Dinkumware, Ltd. (http://www.dinkumware.com)
     
    Pete Becker, Jun 2, 2004
    #7
  8. Andreas Nauerz

    Leor Zolman Guest

    On Tue, 01 Jun 2004 19:48:53 -0400, Pete Becker <> wrote:

    >Leor Zolman wrote:
    >>
    >> 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.


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


    --
    Leor Zolman --- BD Software --- www.bdsoft.com
    On-Site Training in C/C++, Java, Perl and Unix
    C++ users: download BD Software's free STL Error Message Decryptor at:
    www.bdsoft.com/tools/stlfilt.html
     
    Leor Zolman, Jun 2, 2004
    #8
  9. Andreas Nauerz

    Pete Becker Guest

    Leor Zolman wrote:
    >
    > 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.

    --

    Pete Becker
    Dinkumware, Ltd. (http://www.dinkumware.com)
     
    Pete Becker, Jun 2, 2004
    #9
  10. Andreas Nauerz

    Ivan Maidanski

    Joined:
    Feb 12, 2010
    Messages:
    1
    I could suggest a tool called JCGO (ivmaisoft.com/jcgo/) which is a Java source to C translator. The produced C code is readable.
     
    Ivan Maidanski, Feb 12, 2010
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Ryan

    Java WMA to MIDI Converter

    John Ryan, Aug 17, 2003, in forum: Java
    Replies:
    2
    Views:
    4,511
    Tommy88
    Oct 14, 2009
  2. TomasH
    Replies:
    2
    Views:
    6,312
    La'ie Techie
    Oct 15, 2003
  3. Aidan Diffey
    Replies:
    1
    Views:
    11,129
    Stefan Ram
    Dec 21, 2005
  4. Ravi
    Replies:
    13
    Views:
    26,732
    Paul Lutus
    Oct 20, 2003
  5. Vinod Kone
    Replies:
    7
    Views:
    178
    Logan Capaldo
    Jan 22, 2007
Loading...

Share This Page