Covert C++ to Java... Possible?

This may seem like a stupid question, but are the wrappers for Java
equivalent to C++ wrappers?

I ask because I wrote all this code in C++ and it executes from the command
line. I then made a GUI in Java (I had no choice) and I call the .exe file
from Java.

It would be nice to add a progress bar but since the languages don't 'talk' I
don't know how to do that unless I port it to Java.

I'm not doing anything too fancy, just opening a file and reading it row at a
time into an array.

Very respectfully,

Phil Salesses
Cartographic Technician
U.S. Army Topographic Engineering Center (TEC)
7701 Telegraph Road
Alexandria, VA 22315-3864
Mark.P.Salesses@usace.army.mil

TEC R&D - Anything But Ordinary

There is an API:

http://www.hdfgroup.org/hdf-java-html/JNI/jhi5/index.html

Dave McCloskey

ยทยทยท

From: Salesses, Mark P ERDC-TEC-VA
[mailto:Mark.P.Salesses@usace.army.mil]
Sent: Wednesday, June 18, 2008 2:03 PM
To: hdf-forum@hdfgroup.org
Subject: [hdf-forum] Covert C++ to Java... Possible?

This may seem like a stupid question, but are the wrappers for Java
equivalent to C++ wrappers?

I ask because I wrote all this code in C++ and it executes from the
command line. I then made a GUI in Java (I had no choice) and I call
the .exe file from Java.

It would be nice to add a progress bar but since the languages don't
'talk' I don't know how to do that unless I port it to Java.

I'm not doing anything too fancy, just opening a file and reading it row
at a time into an array.

Very respectfully,

Phil Salesses
Cartographic Technician
U.S. Army Topographic Engineering Center (TEC)
7701 Telegraph Road
Alexandria, VA 22315-3864
Mark.P.Salesses@usace.army.mil

TEC R&D - Anything But Ordinary

This may seem like a stupid question, but are the wrappers for Java
equivalent to C++ wrappers?

I have not worked with either extensively, but there are some semantic and
functional differences between the object model for the Java API and the C++
API.

I ask because I wrote all this code in C++ and it executes from the command
line. I then made a GUI in Java (I had no choice) and I call the .exe file
from Java.

It would be nice to add a progress bar but since the languages don't 'talk'
I don't know how to do that unless I port it to Java.

I'd suggest that a work-around like using the exe's stdout to drive a GUI
progress bar or recompiling it as a dll and using JNI or JNA to handle the
invocation and status reporting might be less work than porting your
existing code.

I'm not doing anything too fancy, just opening a file and reading it row at

a time into an array.

That sounds simple enough that you can probably do it with the Java API, if
you want. However, the Java API uses the HDF5 1.6.6 native library, so if
you are using any tricky HDF5 1.8 features, you may have some problems.

(Hope that helps ...)

- Solomon