Re: C++ to Java Conversion Utility



On Jan 15, 12:08 pm, Ron <bnor...@xxxxxxxxx> wrote:
I'm looking for a utility program that will convert C++ to Java.

I have already searched this group on the topic, but most of the posts
are quite old.  I'm wondering if there is more up-to-date info.

I saw one previous post suggesting C2J.  I'm going to give that a try,
but based on that thread it looks like the results from C2J may not be
all that useful.

Also, I did read all the advice explaining that a C++ to Java utility
is a bad idea.  I am in agreement.  But here is my situation:

I work on a tool, written in java, that monitors and displays messages
exchanged between two C++ programs.  The number of messages is growing
quite fast, and even the definition for existing messages changes
quite often.  Currently I am converting these message definitions by
hand from the original C++ source to java, but I am rapidly becoming
unable to keep up with the changes.

Also, the only things I really need to convert automatically are
header files, and those header files have either:
- a struct that defines the fields in a message
- a enum that specifies the possible values for a field in a message

So I am not trying to convert whole programs...just some fairly simple
type definitions.

Automation would help alot.  I'll write my own tool if I need to, but
why re-invent the wheel if I don't need to?

Any advice is appreciated.

I tried C2J, but I'm pretty sure it is not the tool for this job. It
would seem that you need an entire, compilable C project; there is no
single file conversion. And it also seems like you need to add files
to a C2J workspace one at a time (the project I'm trying to convert
has hundreds of files). And it crashes alot. And it won't take .cpp
files...only .c files. Maybe someone out there has looked deeper than
I have, and has discovered other ways to get C2J to convert files.
I'd be interested in knowing if I misunderstood something about how
C2J works.
.



Relevant Pages

  • C++ to Java Conversion Utility
    ... I'm looking for a utility program that will convert C++ to Java. ... I have already searched this group on the topic, but most of the posts ... header files, and those header files have either: ...
    (comp.lang.java.programmer)
  • Re: Giving an application a window icon in a sensible way
    ... *does* provide valuable information in his snappy posts. ... Java that aren't better answered by surfing Sun's site... ... not interested in learning the Java programming language at all. ...
    (comp.lang.java.programmer)
  • Re: C++ RunTime Error IE6
    ... The java application is only certified up to Sun JRE 1.4.2_08. ... Vincenzo Di Russo wrote: ... >Please include all of previous posts in your replies, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: C++ to Java Conversion Utility
    ... I have already searched this group on the topic, but most of the posts ... I work on a tool, written in java, that monitors and displays messages ... wrappers to existing C/C++ classes and functions, using JNI. ... I had quite a hard time setting up Eclipse to handle the SWIG project, ...
    (comp.lang.java.programmer)
  • Re: trying to close a window and open a new one without toolbars
    ... pointing out your mistake, so that you/others wouldn't make the same mistake ... > posted on a java group than java qs are posted in JS/design ones. ... > have constantly seen people asking HTML and Javascript questions to ... - posts like yours ...
    (comp.lang.java.programmer)