I do not know of any tool that will do this.  It's not as simple as
saying "convert this code", since C/C++ has constructs that Java does
not support and vice-versa.  Even something as simple as the magic
number at the start of the byte code is different.  You would be far
better off attempting to convert the C/C++ source code to Java source
code, and even that is not going to be straightforward.  If you found
a tool that purported to do what you want, I wouldn't count on it to
do the right thing.  How would you even accomplish that?  If I
converted C code to Java byte code I'd want to use a tool to show me
what the code actually was (like Mocha).  If I have to do all that,
and verify that what the byte code is doing is correct, I might as
well do the conversion myself.    It would be easier, if you have the
C/C++ source code, to write a small bit of Java to invoke the compiled
C/C++ code than trying to convert it.  This is a well-known way to
integrate Java and C.

Ken


On Sep 22, 9:56 am, Sitaram Koundinya Potula
<[email protected]> wrote:
> Hi,
>
> I have a requirement of converting c/c++ code to java byte code.
> Can any one help on this?
>
> Thanks in advance
> *RaM*

Reply via email to