Solved

Tool to convert java to c++

Posted on 2013-10-29
6
1,079 Views
Last Modified: 2013-11-19
Dear Experts,

I want to convert my java source code to c++ one.
Is there any tool supporting us doing this.
Please help.

Regards.
0
Comment
Question by:FSOFT-SA
6 Comments
 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
Hi FSOFT-DA,

did you already try to google for it? I.e. if you goole convert java to c++ you get lot of hits, beyond them link to tools like J2C (http://code.google.com/a/eclipselabs.org/p/j2c/).

ZOPPO
0
 
LVL 9

Assisted Solution

by:masheik
masheik earned 150 total points
Comment Utility
Hi,

Believe it or not conversion from one Programming language to another using some tool won't work great,
i tried few things earlier like matlab to c , perl to c , swig etc but none of them helped .

For code modification of converted code becomes very complex, anyway you will find n number of tools if you google it as zoppo said earlier
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
I want to convert my java source code to c++ one.
Why? ;)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:FSOFT-SA
Comment Utility
Thank all for your comments.

I did google already.
But there're plenty of tools.

About J2C, I did try. And I thought it's generated code is not a native C code style (I think).

I also try this, http://www.tangiblesoftwaresolutions.com/Product_Details/Java_to_CPlusPlus_Converter_Details.html, it's generated code looks better.
But I must buy it.
To buy is OK, but it's better to listen to experienced people.

So, if you already used such a tool, please give me advices.

@CEHJ: it's just a requirement :).

Regards.
0
 
LVL 12

Accepted Solution

by:
Sharon Seth earned 200 total points
Comment Utility
If it's a requirement , then probably you should be 'porting' code to C++ , rather than 'converting' . IMO converters are a good choice when you are converting IDLs , not when you are porting systems
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 150 total points
Comment Utility
Indeed. A converter that hasn't had a great number of man hours invested in it is more than likely going to mangle your code.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now