Jump to content

JAVA to C++ conversion

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
juicyfruitwow

juicyfruitwow

    Newbie

  • Members
  • Pip
  • 4 posts
I was wondering if there is a way to convert simple java code into c++.
I am not importing any special java libraries other than the standard java ones.
If not maybe there is an easier way to do this e.g. JAVA to C then C to C++.
I would really appreciate if someone knows a program which could help me with this problem.

Thank you for your help

#2
ksemeks

ksemeks

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
A little googleing woulndn't hurt you, would it?
There're a couple of Java to C/CPP converters, such as XES (Java2C++), J-C-GO (Java2C), and there's even a C2Java converter.

Hope that's what you've been looking for.

#3
juicyfruitwow

juicyfruitwow

    Newbie

  • Members
  • Pip
  • 4 posts
Thank you for the quick response. I have tryed XES & J-C-GO but it was quite disappointing. As for C2Java, it wont get the job done as I only have java code atm. I am wondering if anyone knows some better tools for java to c++ conversion.

#4
ksemeks

ksemeks

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
You can try this as well, Java2C from Sourceforge.net .

But, realisticly, you can't really expect a converter which would do the conversion from java to cpp 100% working.
This couple of converters are as good as you get 'em.

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Something important to realize is that many basic Java libraries (like AWT, threads, etc) do not have C++ equivalents without using additional libraries.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
ksemeks

ksemeks

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
You can try xmlvm, which translates java bytecode.