Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java to C++  RSS feed

 
william keelman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know a free Java to C++ converter?
 
Linda Walters
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only thing I have ever seen is this Perl script to convert Java to C++.

Having done much coding in both languages ever since they were both hatchlings, I can only as why you would want to do that?
[ May 03, 2006: Message edited by: Linda Walters ]
 
william keelman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to do it so I can run my program as a .exe
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by william keelman:
Java to C++ converter?


And how would such a tool deal with the
Garbage Collected Environment -> Manual Allocation/De-allocation
issue?

Unless it uses a special environment like A garbage collector for C and C++ I would have serious doubts.

What about the java runtime libraries � how would those be accounted for?

In an MS Windows environment its just simpler to pack the whole thing in a JAR and set up an file type association for JARs like:
"C:\Program Files\Java\jre1.5.0_04\bin\javaw.exe" -jar "%1" %*

The Sun runtime installation creates that file type association for you.

Of course you still need the Java runtime - the application's setup package should detect any installed Java runtimes and install the one that is needed if its not already present.
[ May 03, 2006: Message edited by: Peer Reynders ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by william keelman:
I want to do it so I can run my program as a .exe


What's wrong with en executable JAR file?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!