Hello everyone,
I am aware that Java can use c++ methods in a dll.
But I would like to know if Java creates own objects of the dll
classes.
On the java side I want to communicate with a .Net application through
a object with get and set methods. but this would only work if java
does not have its own objects created from the dll.
I this possible or do I have to go another way?
I already can communicate between java and .net with IIOP. But this is
not very easy and I have problems getting events to work.
Thanks in advance.
Greetings Juergen
Gordon Beaton - 28 Nov 2005 13:57 GMT
> I am aware that Java can use c++ methods in a dll.
> But I would like to know if Java creates own objects of the dll
> classes.
There are no "dll classes". You use JNI to implement methods in native
code, but the class they belong to is still described with a Java
source file.
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Thomas Fritsch - 28 Nov 2005 15:24 GMT
> I am aware that Java can use c++ methods in a dll.
Java via JNI does *not* call C++ methods, but it does call plain C
methods. The C method prototype is as generated by the javah-tool: i. e.
with extern "C" (in case of C++ compilation), JNIEXPORT and JNICALL.
However, from the JNI-called C method you may call C++ methods as you like.

Signature
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')
Roedy Green - 28 Nov 2005 16:28 GMT
>I am aware that Java can use c++ methods in a dll.
>But I would like to know if Java creates own objects of the dll
>classes.
Java calls Java native methods written in C. Those methods then do
C-like things in the ordinary C way, and manipulate Java's objects via
a library of C methods provided by Sun.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.