Ho guys,
Iam trying to use a existing c library and build a java based interface for
it.I have written a java program for this and created the corresponding
header file and i have also written a c file to execute the native methods.
while compiling through gcc it doesnt give me any errors and the shared
libraries are created fine.
But when i run the java program it doesnt execute the c function (i,e) it
doesnt return out of the c function which is in an existing c
library(static) which i have
linked it to the shared library.
This created shared library works fine if i write a c program and compile it
using this library and i get the desired result.
But this doesnt work with the java program (i,e) it hangs and never returns
from the c function.
***more info***
**Compiled the c file with this command**
gcc -c -I. -I/usr/local/jdk1.2.2/include -I/usr/local/jdk1.2.2/include/linux
-I/home/vpopmail/include cInterface.c
**created the shared library with this command**
gcc -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/local/jdk1.2.2/include
-I/usr/local/jdk1.2.2/include/linux -I/home/vpopmail/include -shared -o
libjni.so cInterface.c -L/home/vpopmail/lib -lvpopmail -lmysqlclient -lcrypt
********
Iam also attaching the java and c files...
Iam using
java version "1.2.2"
Classic VM (build 1.2.2-L, green threads, nojit)
on
Red Hat Linux release 6.2 (Zoot)
Kernel 2.2.14-12 on an i686
Thanks in advance
Best regards
dushyanth
--
Dushyanth Harinath
Programmer
Archean Infotech Limited
http://www.archeanit.com
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]