• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNI Tutorials

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the best references on JNI is Sun's online tutorial on the topic here.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic