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
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
I've never tried JNI before but I do like the link since it has a lot of source codes for Data Structures... :)
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
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
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
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