• Post Reply Bookmark Topic Watch Topic
  • New Topic

C++ to Java using JNI

 
PJ Crump
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a C++ program that has a pointer that is a reference to an image. I need to pass the pointer to a java program so that I can perform processing on the image. What I am finding is that calling C++ from Java is not a problem, but this has me stumped.. Does anyone have any examples of a C++ program calling Java??
[ September 17, 2007: Message edited by: PJ Crump ]
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before your C++ program can call Java, you have to have a JVM running.

To run a JVM, use the Java Invocation API. In that same API are C++ functions for loading Java classes, finding methods, creating objects, invoking methods etc.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!