Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

JNI and C++

Thread view: 
bbembi_de@lycos.de - 28 Nov 2005 14:18 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.