> On Friday, June 15, 2012 2:57:42 PM UTC-4, (unknown) wrote:
> > Could anyone give me a tutorial on how to use NetBeans 7.1.2 to
> > create a java project that uses JNI. I'm looking for something with
> > all the detail I can get.
> >
> > My small java project will use a small subset of the class' in a
> > large C++ package.
> >
> > Is there good documentation on doing this. Is there more than one
> > way to do it.
>
> I'll accept any SIMPLE (complete) JNI example that uses NetBeans
> 7.1.2, a dot java with a static main, and invokes a C++ project.
I don't know anything that specific; I've always relied on the JNI
Tutorial [1] and the JNI Specification [2] for specific problems. You
may not need it for your project, but this JNI_CreateJavaVM example [3]
may come in handy.
> The various examples on the Internet tell me to create 2 projects,
> but involve older versions of NetBeans. I'm still trying, but I can't
> get a simple "Hello World" to work!
Like this one [4]?
> Where is a detailed example that uses NetBeans 7.1.2?
I've never tried to do it entirely in NetBeans; I've used `make` to
create the jnilib itself and a suitable ant target to build the Java
dependencies.
[1] <
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html>
[2] <
http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html>
[3] <
http://www.jguru.com/forums/view.jsp?EID=1264492>
[4] <
http://patriot.net/~tvalesky/jninative.html>