LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-06-2010, 12:58 AM   #1
Nagababa
LQ Newbie
 
Registered: Jul 2010
Posts: 15

Rep: Reputation: 0
Is there any tool that can convert my whole Java code to c/c++


Hi All

As a part of my project I have to write the code from scratch in c/c++ but I already have a full blown Java code available with me. Is there any tool that can do the same.
 
Old 08-06-2010, 01:21 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You mean you want to find a tool that'll write your homework for you?

Sigh...

PS:
Yes, Java to C++ translators exist. But the results are seldom satisfactory. And remember: there are fundamental difference between Java and C++ environments ("pointers" and "garbage collection" are two minor things that immediately come to mind ). So even if you get something that does a decent job of translating from one syntax to another ... that's still a far cry from having a program that actually works.

Sounds like this is a good opportunity for you to sharpen your C++ skills, my friend...
 
Old 08-06-2010, 02:04 AM   #3
Nagababa
LQ Newbie
 
Registered: Jul 2010
Posts: 15

Original Poster
Rep: Reputation: 0
Hi Paulsm

Thanks for your quick reply and with all due respect let me tell you something, the first three lines and the last line were not required.

Tell me the very basic idea behind these forums???? Are these forums meant to comment or criticize on Posts or to HELP????

You have no idea how many years of exp I have or may be I am a fresher. You don't even know whether I am new to java or C++ but even then you wrote something. It looks like you want tell everyone who is visiting this page that you are a ocean of knowledge. If this is the case then I guess there are lot many ways to prove it to world. :-)

Also you are very much concerned about my c++ skills/Homework and all but have you given a single useful link to any site or any link to useful documents??????

You quoted "And remember: there are fundamental difference between Java and C++ environments ("pointers" and "garbage collection" are two minor things that immediately come to mind )."

What other things come to your mind if you give it a thought for few minutes????

Anyways there is no point in discussing this if you can provide me something useful i would be very thankful to you.

Regards
Nagababa
 
Old 08-06-2010, 02:14 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
@Nagababa,

If you read the rules properly, you will find that homework is not allowed here. You will need to tell what you have already tried and then ask us to help you get out of the deadlock. Just asking people to do your homework will not get you any better responses. And with this attitude on forums where you do not pay members to help you, you have no right to tell what he/she should be doing.
This is a help forum but not where you come and ask members to do your homework.
 
Old 08-06-2010, 03:47 AM   #5
Nagababa
LQ Newbie
 
Registered: Jul 2010
Posts: 15

Original Poster
Rep: Reputation: 0
Hi Chaitanya

Please let me clarify I just asked is there any tool that can covert Java code to C/C++ or not.....

and the rest is what one of the senior member has replied it was not me who said its my homework or not, it was not me who said I need to brush up my C++ skills.

I had a very straight forward question. It would have been much more simpler if he would have not said all these. In fact I just replied back to all those things which were not true.

I am really sorry to say it again Chaitanya and with all due respect please don't get biased just because I am new comer to this forum. It was all started from other end and also u r following the suit. From where the ATTITUDE jumped into. I just clarified that neither it is my homework nor my C++ skills are dull. Boss please don't take it other way round.

Regards
Nagababa
 
Old 08-06-2010, 04:04 AM   #6
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Quote:
Originally Posted by Nagababa View Post
Please let me clarify I just asked is there any tool that can covert Java code to C/C++ or not.....
Just search in Google the following and see the results for yourself:
Quote:
java to c++ code converter software
and if Paul (a very knowledgeable member) says
Quote:
Originally Posted by paulsm4 View Post
Yes, Java to C++ translators exist. But the results are seldom satisfactory.
you must rethink on using those translators.
 
Old 08-06-2010, 04:04 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
No. It is not the way it goes. Everyone is a newbie at some point of time. I was and and am still one. You never said it was your homework but the way you phrased you question, it pretty seems it is. What members here like is that you do some work and searching yourself, put some effort and then ask where you are stuck. You show some effort and members here will surely help you out and I have seen members going great lengths to help others.
Paul never meant to disgrace you. Nobody will. But you will have to show your commitment. Instead of arguing on, if you told what steps you have taken till now, you will get better responses. And this is because this is a volunteer forum. Members help others with their own time and effort. So you need to take care on how to ask question properly and what information you need to provide. It is always better to provide as much information as possible.
 
Old 08-06-2010, 04:11 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
http://www.javakb.com/Uwe/Forum.aspx...Java-converter

You may want to go through this link. It also discusses the point of level of satisfactory conversion of the code. There are links to the softwares as well. But you may want to use and see for yourself.
 
Old 08-06-2010, 04:38 AM   #9
Nagababa
LQ Newbie
 
Registered: Jul 2010
Posts: 15

Original Poster
Rep: Reputation: 0
Hi All

Might be it was my mistake I thought of just asking a direct question and I was anticipating a direct answer.

More over I did searched already and have lot of things with me and I thought providing all these info would be a headache to all others who might be reading it.

Here are my findings

1) I got a commercial software (JCGO) to do that part but as Paul mentioned it is not reliable and thinking of migrating the whole Java project to C or C++ is not recommended.

2) The various tar balls that need to be downloaded for JCGO to work are

* jcgo-bin-win32-x86.zip (the JCGO translator executable for Windows development host) [PAD file] [Icon] [Screenshot];
tar ball for unix environment is also there.

* jcgo-src-1_01.tar.bz2 (the source files used by JCGO and by a C compiler);

* jcgo-lib-1_00.tar.gz (the auto-generated Java files used by JCGO, precompiled libraries and auxiliary executables);

* classpath-0.93.tar.gz (the GNU Classpath - Essential Libraries for Java) .
/**********************************************************************************/

After reading all the things I too drew the same conclusion that it can be done but not reliable in some cases, not even readable and also not recommended to migrate the whole Java project to C or C++ using the tool.

But what actually I was expecting the replies to be like; it is possible but u will find the results unsatisfactory or not readable because of "blah blah ..." reasons and facts.

I think I asked in the wrong lingo and ended up in mess. SORRY FOR CREATING A MESS. MY APOLOGIZES to you all.
 
1 members found this post helpful.
Old 08-06-2010, 05:14 AM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Quote:
Originally Posted by Nagababa View Post
More over I did searched already and have lot of things with me and I thought providing all these info would be a headache to all others who might be reading it.
Cheer up now

It is always a good idea to specify all that you have tried to solve the problem in your first post itself so that one doesn't get a feel that you have posted some home work question. Being specific always helps.

BTW it is very important to make your post readable. Try to refer to the below link to make life easier for others.
http://www.linuxquestions.org/questi....php?do=bbcode

Last edited by TheIndependentAquarius; 08-06-2010 at 05:16 AM.
 
Old 08-06-2010, 05:39 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
Quote:
Originally Posted by Nagababa View Post

But what actually I was expecting the replies to be like; it is possible but u will find the results unsatisfactory or not readable because of "blah blah ..." reasons and facts.
First it is always good to give as much information as possible so that others know where you are fixed.
Better is to give what you have tried so that members do not repeat the same solutions that you have already tried and been unsuccessful.

And I guess you had already got the answer you were expecting, in part, from Paul in his post#2. His answer was valid in this context. But you took his pointings a bit too personally.
 
  


Reply

Tags
conversion, java, tool


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Small matlab code to convert Morse code to plaintext using regular expressions gregorian Programming 3 03-31-2010 12:34 PM
Tool to convert gif to avi bloodiestmarry Linux - Software 4 06-18-2009 02:22 PM
pls convert this windows code into linux code nagendrar Programming 6 06-03-2008 07:00 AM
some tool to convert C code to x86 rmanocha Programming 7 03-26-2005 01:11 PM
is there any tool avilable to convert java/sql code into asp.net/sql2000 rddreamz Programming 1 11-08-2004 02:16 PM


All times are GMT -5. The time now is 04:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration