Hi Everyone

Has anyone experimented with Java Native Interface (JNI)...

I did about 5 weeks ago, The one they show at the Sun site,

Oh ! Java Native Interface (JNI)... is when you hook up a DLL made in C or C++, ASM etc to a Java program.
You probally can do more than just DLL's

As I remember with C or C++, you use the Javah command and it creates a header file,,

better yet

http://www.javacommerce.com/tutorial/JavaData/JavaData3.html#Java_Native_Interface

This is a neat, little exploration

And before we know we could get a nice example together on
this , using ASM than C for a native Interface language

Andy
Posted on 2002-04-05 15:36:04 by andy981
I've never tried JNI before but I do like the link since it has a lot of source codes for Data Structures... :)
Posted on 2002-04-05 15:42:01 by stryker
Hi,

just check out the netscape plugin SDK. There is a project included which explains how to wirite a DLL which can be used from Java. The tool 'javah' only generates the stubs and entries for the DLL as an interface to your functions.

In addition I tried to use the flash plugin to 'play' flash movies. It was a wrong choice, using the ActiveX control is a lot easier and works.

Any comments on how to use the java from an asm proggie is highly appreciated.

Bye Miracle
Posted on 2002-04-08 06:28:52 by miracle
The following site has a very good example http://www.amherst.edu/~tliron/jni/assembly.html

I had to add the following to the DEF file to make the function external.

LIBRARY  hjwdll
EXPORTS  Java_ShowMessage_HelloDll

But it works with MASM32, RADASM, and JBuilder 2005
Posted on 2005-10-28 12:55:34 by Gandolf