Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use a Exported C++ class from a DLL in JAVA

843829Apr 29 2009 — edited May 1 2009
Hi all

i have a DLL which exports classes, i have to use this in a Java appliation , i have seen examples where JNI can be used to access, functions exported from a win32 DLL, but i did not find anything related to Exported C++ classes.

Example:
Abc.dll has a class called CMyClass

how do i wrap this in JNI , so that in a java program , i can instanciate CMyClass cs = new CMyClass( )
and call methods of CMyClass in java program.

Does JNI provide such fucntioanality, can anyone share me a sample code


regards
MP
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2009
Added on Apr 29 2009
16 comments
935 views