File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes JNI Tutorials Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "JNI Tutorials" Watch "JNI Tutorials" New topic
Author

JNI Tutorials

Raghuraman Muthuswamy
Ranch Hand

Joined: Mar 18, 2003
Posts: 73
Dear All,
I am going to work on a project with Java. The project involves existing C++ code into Java. I have understood that 2 ways of doing this is Corba and JNI. I want to use JNI. I need tutorials on JNI. Kindly send me which book i have to follow or good web sites which teach JNI from a beginners perspective. Your reply is very much appreciated.

Thanks in advance,

Regards,
Raghu
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

One of the best references on JNI is Sun's online tutorial on the topic here.


[Jess in Action][AskingGoodQuestions]
Dom King
Greenhorn

Joined: May 19, 2004
Posts: 18
If you need to call existing C++ code using JNI, take a look at NewJNI, the natural C++ interface to Java. NewJNI is included free with NewJ for C++.

http://www.pure-native.com/newj.html

Things to consider:
- Full source code for NewJNI libraries is included, which can help you learn JNI.
- NewJNI is only implemented for Windows at this time, although the source code is overall very portable C++ and JNI.
Raghuraman Muthuswamy
Ranch Hand

Joined: Mar 18, 2003
Posts: 73
Hello,
I tried to implement the example given in java.sun.com for JNI tutorials. Its the HelloWorld example. I compiled the HelloWorld program, but when the next instruction of creating a header file using javah -jni HelloWorld is not working. It says class HelloWorld could not be found. Why is this error. Your reply is very much appreciated.

Thanks in advance,

regards,
Raghu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNI Tutorials