Discussion:
C/C++ - Java Interoperability
(too old to reply)
Robby Tanner
2005-10-26 22:46:44 UTC
Permalink
I'm looking for comments regarding passing information between Java and
C/C++ applications. CORBA is one option, as is simple record passing. How
about objects or EJB? I'm at the very preliminary stages of recommending a
strategy and am willing to put in the time reading, but I'd like a little
direction to get started.

Regards,
Rob
Lori M Olson [TeamB]
2005-10-26 23:00:36 UTC
Permalink
Post by Robby Tanner
I'm looking for comments regarding passing information between Java and
C/C++ applications. CORBA is one option, as is simple record passing. How
about objects or EJB? I'm at the very preliminary stages of recommending a
strategy and am willing to put in the time reading, but I'd like a little
direction to get started.
Regards,
Rob
In terms of Borland products, you probably want to start with something
like Janeva.

http://www.borland.com/us/products/janeva/

For plain-jane Java/C/C++ interop, you want to explore JNI.

http://java.sun.com/docs/books/tutorial/native1.1/

For EJB's... I know there are some products that let you run J2EE apps
on .NET servers, and other products that let you run .NET apps on J2EE
servers... haven't used any of them myself.
--
Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Robby Tanner
2005-10-26 23:38:34 UTC
Permalink
Thanks. We're going to steer clear of .NET out of necessity. The C/C++
apps will be running on Linux and the Java ones on Windows or Linux. What
I'm looking for is some way of passing objects and/or data between them
without having to build our own mechanism over TCP/IP.

Does that change the answer any?

Rob
Post by Lori M Olson [TeamB]
Post by Robby Tanner
I'm looking for comments regarding passing information between Java and
C/C++ applications. CORBA is one option, as is simple record passing.
How about objects or EJB? I'm at the very preliminary stages of
recommending a strategy and am willing to put in the time reading, but
I'd like a little direction to get started.
Regards,
Rob
In terms of Borland products, you probably want to start with something
like Janeva.
http://www.borland.com/us/products/janeva/
For plain-jane Java/C/C++ interop, you want to explore JNI.
http://java.sun.com/docs/books/tutorial/native1.1/
For EJB's... I know there are some products that let you run J2EE apps on
.NET servers, and other products that let you run .NET apps on J2EE
servers... haven't used any of them myself.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
http://www.borland.com/newsgroups/ngsearch.html
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Kevin Dean [TeamB]
2005-10-27 01:18:17 UTC
Permalink
Post by Robby Tanner
Thanks. We're going to steer clear of .NET out of necessity. The C/C++
apps will be running on Linux and the Java ones on Windows or Linux. What
I'm looking for is some way of passing objects and/or data between them
without having to build our own mechanism over TCP/IP.
Does that change the answer any?
You have two choices. For high-volume transactions, especially when
dealing with large volumes of data, I would recommend CORBA. I had
exactly that setup using VisiBroker and it worked quite well. Coding IDL
is a bit of a nuisance but it's well worth the effort.

The other alternative is to use web services. This works very well;
because it uses HTTP it can traverse firewalls more easily but is not as
fast as CORBA due to the XML overhead. One application I have has the
credit card authorization running through web services; this has a fairly
high transaction rate but a low amount of data. Another application
pushes delivery acknowledgements from handhelds to a web server; the
delivery acknowledgements are infrequent but contain a large amount of data.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Paul Nichols (TeamB)
2005-10-26 18:04:07 UTC
Permalink
Post by Robby Tanner
Thanks. We're going to steer clear of .NET out of necessity. The C/C++
apps will be running on Linux and the Java ones on Windows or Linux. What
I'm looking for is some way of passing objects and/or data between them
without having to build our own mechanism over TCP/IP.
Does that change the answer any?
In addition to Kevin correct and concise answer, you could use sockets and
jni. You could pass objects from say a JSP page to a servlet, and then use
the servlet to parse the object using a JNI to pass the info to the C/C++
routine. Could be less complex (depnding upon your needs), or more complex
than using Corba.

In the end, it all depends on how large and complex your dependencies on
Java to C /C++ are.

There are some very easy to use JNI libs out there BTW, than the standard
ones that are a part of the core of the J2SDK itself.

Here are a few:

JNIWrapper: (Shareware)

http://www.jniwrapper.com/pages/home

XFunction: )Shareware)

http://www.excelsior-usa.com/xfunction.html


JACE: (Open Source)
http://sourceforge.net/projects/jace


EasyJNI: (Open Source)

http://www.alphaworks.ibm.com/ab.nsf/bean/easyJNI

Doychin Bondzhev
2005-10-27 05:44:45 UTC
Permalink
I'm using similar configuration where I have some C++ code that is on
Linux and lots of Java on windows and Linux and as option to exchange
data from Java to C++ I'm using FTP to send data via files and rsh to
tell the Linux box to process that data. this can also be used to get
result from C++ code via it's standard output.

For real objects WebServices and CORBA are the best choice.

Doychin
Post by Robby Tanner
I'm looking for comments regarding passing information between Java and
C/C++ applications. CORBA is one option, as is simple record passing. How
about objects or EJB? I'm at the very preliminary stages of recommending a
strategy and am willing to put in the time reading, but I'd like a little
direction to get started.
Regards,
Rob
Loading...