• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using Java Native Interface

 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am new to Java Native Interface.I have written on sample class


Now what i am doing that i am trying to make .h (header) file for this class file by writting the command:

javah -jni -o HelloWorld.h com.JavaFiles.firstJNI

it is not giving any error and not even creating any HelloWorld.h file.

Can you please tell me that where i am missing

Thanks
Gaurav
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Its been a long time since i did any JNI, but i dont remember the javah command being the complex, and the example I found by doing a quick google search wasnt either.
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html

It might be worth reading the full tutorial there.


Sun do a very good programms guide to JNI: "Java Native Interface: Programmer's Guide and Specification"

We found it very helpful.

I still have nightmares about it all
G
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!