JNI problem
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]
Re: JNI problem
At 1:20 01 Jan 2001 +0530, Dushyanth Harinath wrote: > 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. I'd encourage you to do one mailing list at a time - mail that, if you don't get a response, mail the other. If you still don't get a response, no-one knows (or no-one with the time to answer knows ;) > java version "1.2.2" > Classic VM (build 1.2.2-L, green threads, nojit) Have you tried native threads? Set THREADS_FLAG=native and see what happens. You might get lucky. Paul -- Paul Mclachlan ([EMAIL PROTECTED]) Software Engineer, Java Tools. NuMega Lab, Compuware corp. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
question about running jdb on redhat linux 7
Hi, I cannot run jdb under linux, after I input 'step', jdb seems hung there (there's no output, whatever i input), I don't know why. I tried jdb under DOS, and it's ok. Has anyone met with the same problem with me? How to solve this problem? One further question: How do you debug java under linux environment? thank you very much! C:\javacc2.0\examples\VHDL\Vhdl>jdb -launch -classpath . Vhdl ams.vhd Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignor ed Initializing jdb... > VM Started: No frames on the current call stack main[1] step main[1] Step completed: thread="main", Vhdl.main(), line=30, bci=0 30 if (args.length == 1) main[1] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: question about running jdb on redhat linux 7
Hi, On Tue, 09 Jan 2001 18:31:01 [EMAIL PROTECTED] wrote: > Hi, I cannot run jdb under linux, after I input 'step', jdb seems hung > there > (there's no output, whatever i input), I don't know why. I tried jdb > under > DOS, and it's ok. Try the JDKs from Sun or IBM, they seem to work OK. Ciao... -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]