Here are some details of my code. Please note that I have already used javah to generate the prototype for my native method, and I have set the LD_LIBRARY_PATH. Everything compiles fine, it just doesn't run. I don't know what else could possibly be the problem. This does not make any sense whatsoever.
<PRE>
JNITest.java ---------------
----------------------------
class JNITest {
static {
System.loadLibrary("native");
}
public native void pooBah();
public static void main(
String args[]) {
new JNITest().pooBah();
}
}
-----------------------------
JNITest.h -------------------
-----------------------------
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class JNITest */
#ifndef _Included_JNITest
#define _Included_JNITest
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: JNITest
* Method: pooBah
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_JNITest_pooBah
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
-----------------------------
native.cc -------------------
-----------------------------
#include <jni.h>
#include "JNITest.h"
#include <stdio.h>
JNIEXPORT void JNICALL Java_JNITest_pooBah (JNIEnv *, jclass) {
printf("hello world!\n");
}
</PRE>
[This message has been edited by Geoffrey Falk (edited November 16, 2001).]