JNI panic message

2000-11-06 Thread Yuji Suzuki(FUNAI-TKY)
Hi all,
I tried following JNI program.
It was displayed "JNI panic ... " message on the screen when if executed it.
I don't understand something wrong. Please advice me

< My Test Environment(when wrong message): >
<  arm-linux 2.2.14(CPU=SA1110) + jdk118_v2  >
   Addition: But, it works if excuted on .

/**/
// JNI test program "HelloWorld.java"
public class HelloWorld {
static {
System.loadLibrary("helloworld");
}
public static native void Hello(String strArray);

public static void main(String[] args) {
System.out.println ("call JNI method");

Hello("---> Hello JNI method");

}

}// class HelloWorld

/**/
#include "HelloWorld.h"
JNIEXPORT void JNICALL
Java_HelloWorld_Hello(JNIEnv *env, jclass clazz, jstring strP) {
const char *str = (*env)->GetStringUTFChars(env, strP, 0);
printf("%s\n", str);
(*env)->ReleaseStringUTFChars(env, strP, str);
}
// how to compile:
//  gcc -shared -o libhelloworld.so -I/usr/local/jdk118_v2/include \
// -I/usr/local/jdk118_v2/include/linux hello.c -fPIC

Executed message:
--
$java HelloWorld
call JNI method
JNI panic: JNI string operation received a non string
at HelloWorld.main(HelloWorld.java:17)
--
Best Regards,

Yuji Suzuki 




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


question about java 1.3 source

2000-11-06 Thread Gita Sukthankar

Hello,

Does anyone know where I can download the jdk1.3 source for Linux?  I
was able to get the binary from the Sun site, but the only 1.3 source
I saw was for Windows.

Thanks,

-Gita
---
Gita Sukthankar
Compaq Cambridge Research


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: question about java 1.3 source

2000-11-06 Thread Joi Ellis

On Mon, 6 Nov 2000, Gita Sukthankar wrote:

> Hello,
> 
> Does anyone know where I can download the jdk1.3 source for Linux?  I
> was able to get the binary from the Sun site, but the only 1.3 source
> I saw was for Windows.

src.jar is included in the standard distribution, and as far as I know
it's all-java.  

-- 
Joi EllisSoftware Engineer
Aravox Technologies  [EMAIL PROTECTED], [EMAIL PROTECTED]

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
   - Chris Johnson


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]