[kaffe] Kaffe and JNI

Patrick McNeil kalfalfa at shaw.ca
Mon Aug 28 16:03:25 PDT 2006


I'm trying to use Kaffe with JNI, but the FindClass call from C is  
throwing a java.lang.ClassNotFoundException

Specifically, my C code is:

	if (!(ph_exception_class = (*env)->FindClass(env,
		WARN("Coulnd't find class \"com/phidgets/PhidgetException\"");



I'm running the java code with:

java -cp .:phidget21.jar ManagerExample

which outputs:

PHIDGET21: Coulnd't find class "com/phidgets/PhidgetException"
java.lang.ClassNotFoundException: com/phidgets/PhidgetException
    at java.lang.Class.forName (Class.java)
    at java.lang.Class.forName (Class.java:44)
    at java.lang.Runtime.linkLibrary (Runtime.java)
    at java.lang.Runtime.loadLibrary (Runtime.java:187)
    at java.lang.System.loadLibrary (System.java:175)
    at com.phidgets.Phidget.<clinit> (Phidget.java:22)
    at ManagerExample.main (ManagerExample.java:14)

phidget21.jar contains the class com/phidgets/PhidgetException and  
since I specify it with cp it should be on the CLASSPATH, but it's  
not being found for whatever reason.

This works fine with Sun's JRE, but I need to use it on ARM, so I  
need to use Kaffe (which I'd rather use anyways).

Thanks for any advice


More information about the kaffe mailing list