Click here to Skip to main content
15,305,754 members
Please Sign up or sign in to vote.
1.06/5 (7 votes)
See more:
I want convert c++ Program to java Program...
is there any softwares are available for that..
could anyone suggest me to convert that files into java...
Posted
Updated 8-Aug-21 0:13am
Comments
Sergey Chepurin 7-Jun-11 8:46am
   
Automated conversion is only possible (and has some sense) for .NET languages VB.NET<->C# as they share the same classes. You will have to manually convert C++ code to Java, but i think it would be easier to write Java program from the scratch.
   
Correct. I would make it the answer.
--SA
Albert Holguin 7-Jun-11 12:04pm
   
curious, why would you want to convert c++ to java?
   
Why not? Multi-platform version of the code, byte-code would work without re-compilation, can be deployed as applet... makes sense.
--SA
Albert Holguin 7-Jun-11 15:13pm
   
well, pure c++ is also cross platform, just requires the recompilation... but if you already have it in one, don't know how much benefit there is to reinvent the wheel
   
Who knows... Well, I generally quite skeptical about all those "conversions" (what an abuse of this term here by Inquirers!) -- translations. I think just the opposite -- if there is a chance to re-write something, it can be used. Good projects I know was written twice. Those who pretend they do it once in fact usually fall into infinite "fixes" and "improvements" and never finishes... Sad.
--SA
Niklas L 8-Jun-11 3:19am
   
This is a good comment and should be used as an incentive to perform a manual system overhaul.
   
:-)
Stefan_Lang 6-Sep-19 4:13am
   
While I personally believe that most attempts to rewrite something in a different language are misguided, rewriting something in Java would make it easier to create a web based solution. That said, if the original application is very complex, it would be much easier to turn the application into a DLL and then create a simple Java frontend.
Albert Holguin 7-Jun-11 20:14pm
   
BTW, most "code converters" don't work all that great... you'll end up having to interpret gibberish, you're better off doing it yourself.
   
If you look at my comment above (to the comment by Niklas): re-writing has great benefits.
--SA

1 solution

It is possible to run native code from java. Have a look at Java Native Interface[^]. That doesn't answer your question, but it might be a way to solve your problem.
   
Comments
   
Reasonable alternative, my 5. As to "conversion" (there is no "convert", come on!), I agree with Sergey Chepurin (his comment to the question on top).
--SA
Niklas L 7-Jun-11 16:48pm
   
I agree, thanks.
Stefan_Lang 6-Sep-19 4:00am
   
Agree with you on all comments and points you made.
P.S.: just realized this is another case of necroing: someone updated the OP yesterday :-/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900