• 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
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

C++ to Java using JNI

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic