[kaffe] JNI under ARM

Patrick McNeil kalfalfa at gmail.com
Mon Sep 11 12:27:31 PDT 2006


On 11-Sep-06, at 11:06 AM, Dalibor Topic wrote:

> Patrick McNeil wrote:
>
> thanks for the code, I'll give it a shot later.
>
>>
>> It never makes it out of the C function JNI_OnLoad, and either  
>> aborts  (explicitly), of seg faults before it gets to the abort  
>> call in the  findClass failure path. The exception is  
>> nullpointerexception if i  get a chance to read it. I've been  
>> working with gdb embedded on the  arm to try and resolve the  
>> issues but I'm just not very familiar with  the kaffe sources.
>
> Ugh. that does not sound that good, indeed.
>
>>
>> On a side note - where can I put my .jar that contains the  
>> libraries  needed by JNI in C to get them to load properly? I've  
>> had to place  phidgets.jar in the same directory as rt.jar just to  
>> get kaffe to see  it from C. Adding it to the CLASSPATH doean't  
>> seem to work (on ARM or  the debian PC).
>
> Kaffe uses libtool's ltdl's dlopen to load native libraries, so in  
> theory anything on LD_LIBRARY_PATH should work.

Just to clarify - Kaffe finds and loads the native library without  
troubles, but the C library has trouble finding my custom Java  
classes, which are located in phidgets.jar, unless I put phidgets.jar  
in the same place as rt.jar - I would have expected that adding  
phidgets.jar to CLASSPATH would make this jar file (the classes that  
it contains) visible to the C library (findClass).

Thanks
-Patrick

>
> cheers,
> dalibor topic





More information about the kaffe mailing list