• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using JNI  RSS feed

 
Mehdi Bouhaouala
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have some functions that i want to use from a java application.
According to what I read, I have to re-implement my C++ methods?
is that true?
Is there a tutorial that will let me learn how to use JNI?

Thank you!
 
Thomas Bennett
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mehdi Bouhaouala:
Hi all,
I have some functions that i want to use from a java application.
According to what I read, I have to re-implement my C++ methods?
is that true?
Is there a tutorial that will let me learn how to use JNI?

Thank you!


So you want to call you Java application from C++. Then yes you need to do some work. Here is a good doc on what you need to do.

http://java.sun.com/j2se/1.5.0/docs/guide/jni/index.html
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't necessarily need to reimplement your C++ methods -- but you do have to write some C++ "glue" code to bridge between them and the JVM.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!