Loading native shared-libraries dynamically....

Clemens Eisserer Linuxhippy@web.de
Mon Nov 25 07:48:00 GMT 2002


I´m so sorry! 
I´m wasting time of real Proffesionals for such stupid errors.

O.K., you were right! It was an unresolved symbol (I forgot to but the interace in the so lib).

Now it starts, and loads the library fine, but then it says that class bte cannot be a cast to bi (my interface).
This workes fine for *.class-Libraries but now with a compilied bte-class it doesnt work.
I´ve linked in bi.java (the interface) both in the exeutable and in the lib.

Heres again the strace-output:

open("lib-bte.so", O_RDONLY)            = 6
read(6, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\17"..., 1024) = 1024
fstat64(6, {st_mode=S_IFREG|0755, st_size=13530, ...}) = 0
getcwd("/home/clemi/Kompilieren/swt/first", 128) = 34
mmap2(NULL, 10832, PROT_READ|PROT_EXEC, MAP_PRIVATE, 6, 0) = 0x40a68000
mprotect(0x40a6a000, 2640, PROT_NONE)   = 0
mmap2(0x40a6a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 6, 0x1) = 0x40a6a000
close(6)                                = 0
mprotect(0x40a68000, 8192, PROT_READ|PROT_WRITE) = 0
mprotect(0x40a68000, 8192, PROT_READ|PROT_EXEC) = 0
write(1, "java.lang.ClassCastException: bt"..., 55java.lang.ClassCastException: bte cannot be cast to bi
) = 55
brk(0x81d7000)                          = 0x81d7000
brk(0x81d8000)                          = 0x81d8000

My next ditro will be a redhat ;-)

Thanks for helping me, I know im nerving with such stupid questions, but its really hard to find such stuff out be  myself, since I hae a little bit to fight against the gnu-tools;-)

Mfg Linuxhippy


______________________________________________________________________________
Ihr FreeMail-Postfach kann von jedem Telekom Festnetzanschluss erreicht
werden? Mit der Voicebox - http://freemail.web.de/features/?mc=021163



More information about the Java mailing list