473,387 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to convert a big java project to corresponding c++ version?

Hi all,

I want to build a corresponding c++ version for a big java project
(e.g. Geotools(www.geotools.org))? Which is the quickest/easiest way? I
don't want to use the Java VM, then JNI is not suitable.

I know this is a open issue, and I want to know your options.

Thank you!

Best Regards,
Xie, Bo

Mar 11 '06 #1
5 2385
xi*********@gmail.com wrote:
I want to build a corresponding c++ version for a big java project
(e.g. Geotools(www.geotools.org))? Which is the quickest/easiest way?
I don't want to use the Java VM, then JNI is not suitable.

I know this is a open issue, and I want to know your options.


You can probably use some kind of translator to get something up and
running quickly, but in all honesty, the two languages are relatively
dissimilar and fixing whatever you got from the translator will take
you more time than redoing it from scratch using the existing Java
application as the design specification. Just my $0.02...

V
--
Please remove capital As from my address when replying by mail
Mar 11 '06 #2
posted:
Hi all,

I want to build a corresponding c++ version for a big java project
(e.g. Geotools(www.geotools.org))? Which is the quickest/easiest way? I
don't want to use the Java VM, then JNI is not suitable.

I know this is a open issue, and I want to know your options.

Thank you!

Best Regards,
Xie, Bo


What I'd do:

Try compile it with a C++ compiler, then go through all the errors and
warnings. You'll have to replace "boolean" with "bool"... things like
that.

-Tomás
Mar 11 '06 #3
Tomás wrote:
posted:
Hi all,

I want to build a corresponding c++ version for a big java project
(e.g. Geotools(www.geotools.org))? Which is the quickest/easiest way? I
don't want to use the Java VM, then JNI is not suitable.
First question: Why?
I know this is a open issue, and I want to know your options.


What I'd do:

Try compile it with a C++ compiler, then go through all the errors and
warnings. You'll have to replace "boolean" with "bool"... things like
that.


ouch.

I would expect that to cause enough undefined behaviour or outright
stupidity to be a complete nightmare to fix.

Porting a large program requires a large amount of effort. There are no
shortcuts.

I would start by creating lots and lots of test cases for the Java code.
Then I would port the test cases to C++.

Then I would go about reducing the error count by implementing
functionality (from scratch).

It may be useful to extract architectural information out of the Java
codebase and use that to have an understanding of the existing program.

I suspect that whenever you use copy-paste from Java to C++ to expect
more problems than writing it by hand.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Mar 11 '06 #4
The project java version uses a lot of JDK lib. If I want to port the
java project to c++, I must port the related JDK lib. Right? Is there
any c++ version of JDK lib? (e.g. NewJ
(http://www.pure-native.com/newj.html), who has ever evaluated it?)

Best Regards,
Xie, Bo

Mar 13 '06 #5
xi*********@gmail.com wrote:
The project java version uses a lot of JDK lib. If I want to port the
java project to c++, I must port the related JDK lib. Right? Is there
any c++ version of JDK lib? (e.g. NewJ
(http://www.pure-native.com/newj.html), who has ever evaluated it?)


Please quote the relevant part of what you are replying to (in
retrospect, perhaps you did that).

I don't know. There is a list of known libraries regularly posted to
this group. Google (groups) it.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Mar 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Brueck | last post by:
Below is some information I collected from a *small* project in which I wrote a Python version of a Java application. I share this info only as a data point (rather than trying to say this data...
5
by: Robin Johnson | last post by:
Hi, I've written an engine in Javascript for running text adventure games on a web page: http://www.robinjohnson.f9.co.uk/adventure/hamlet.html (That's the only game I've written with it so...
0
by: Markus Wollny | last post by:
Hello! When I try to run ./configure --with-java, it complains that ant doesn't work. However ant is installed, as is the latest Java SDK 1.4.2 from sun, PATH and JAVA_HOME are set correctly; ...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
1
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in...
4
by: =?Utf-8?B?S3VlaXNoaW9uZyBUdQ==?= | last post by:
I have a VC# .NET project which is imported from an OCX control using AxImp. I would like to convert it into a VC++ .NET project. Is there any way to do it and how to do it?
5
by: Jonathan Sachs | last post by:
I'm interested in experienced .Net developers' opinions about whether I should convert an existing Java program to J# or C#. I thought this was a no-brainer until I discovered that with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.