Hi all,
 
1. Where can I find out more details about dl interface(load, use, unload shared library)? any manual or URL?
 
 
2. We know that JNI need to create .so shared library file. Could we load, use this file? E.g. I created fromjava.java and fromjavaImp.c.
 
I compiled fromjava by
 
     javac fromjava.java
     javah -jni fromjava
 
I compiled fromjavaImp.c by
 
    gcc -shared -I/usr/java/jdk1.3/include -I/usr/java/jdk1.3/include/linux fromjavaImp.c -o libfromm.so
 
to get libfromm.so file. When I run java fromjava , it will pass a java string str to native program fromjavaImp.c (libfromm.so).
Could we use other C program e.g. breaklib.c to load this libfromm.so, and get the string (passed from java)?
 
 
3. It looks comlicated, is it? Actually what I trying to do is JVM (JNI_CreateJavaVM) invokes JNI. JNI module will pass java string to C native program. JVM module will get this string from the native program (libfromm.so) and process it.
 
p/s: I tried so hard to access java string from C by using C invokes Java (JVM), but I failed.  So, I create jvm inside C , and access java string by loading libfromm.so(JNI). Is it possible? If anyone know how to access java string from C by using C invokes Java (JVM), please let me know. Any example?
 
Thank you very much
 
soonho

fromjavaImp.c

Breaklib.c

fromjava.java

Reply via email to