On 30 Sep 2005 08:59:19 -0700,
wrote:
> You are right. My java version is 1.4.2_05.
> So I changed the codes into
> vm_args.version = JNI_VERSION_1_4_2_05;
>
> But the error kept the same:
>
> rakta:~/GAQ$ gcc -Wall -D_REENTRANT -I
> /home/gao/java/j2sdk1.4.2_08/include -I
> /home/gao/java/j2sdk1.4.2_08/include/linux-c invokeLinux.cpp
> invokeLinux.cpp: In function `int main()':
> invokeLinux.cpp:24: error: `JNI_VERSION_1_4_2_05' undeclared (first use
> this
> function)
> invokeLinux.cpp:24: error: (Each undeclared identifier is reported only
> once
> for each function it appears in.)
The only valid values are (AFAIK) JNI_VERSION_1_4, JNI_VERSION_1_2 and
JNI_VERSION_1_1, they are listed in jni.h.
The paths you mention in the example above don't agree with what
you've posted elsewhere, where you mentioned
/usr/lib/jvm/java-1.4.2-sun-1.4.2_05.
It seems you have several java versions installed. You need to make
sure you compile and link against the correct (and same) one.
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e