Hi all,
I am a new user to this list. Few days back i tried to install
jdk1.2 on redhat-6.0 but it is giving the following error..
*** panic: GC: getStickySystemClass failed: java/lang/ref/Reference
CLASSPATH may be incorrect
SIGABRT 6* abort (generated by abort(3) routine)
stackpointer=0xbffff620
Full thread dump Classic VM (Linux_JDK_1.2_pre-release-v1, native threads):
"main" (TID:0x40cf91e0, sys_thread_t:0x804c458, state:R, native ID:0x400) prio=5:
pending=java.lang.OutOfMemoryError
Monitor Cache Dump:
Registered Monitor Dump:
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "main" (0x804c458) 1 entry
Thread queue lock: owner "main" (0x804c458) 1 entry
Dynamic loading lock: <unowned>
Monitor registry: owner "main" (0x804c458) 1 entry
can somebody tell me what's this error and what needs to be done to make
it working.
regards,
Raj
On Wed, May 26, 1999 at 12:23:53AM -0700, Kevin Ryan wrote:
rkevinr> You can use JNI (the Java Native Interface) to accomplish this.
rkevinr>
rkevinr> a) your C/C++ functions have to be packaged in a shared library (which
rkevinr> you'd already anticipated)
rkevinr>
rkevinr> b) the entry point for your C/C++ code has to use a Java
rkevinr> package-and-class-specific "mangled" name -- e.g., if your Java wrapper
rkevinr> class is "Wrapper" and that class is in package "Enclosure", you might have
rkevinr> a Java class such as:
rkevinr>
rkevinr> package Enclosure;
rkevinr>
rkevinr> public class Wrapper {
rkevinr>
rkevinr> public Wrapper() {
rkevinr> // ...
rkevinr> }
rkevinr>
rkevinr> // (only) declare in Java; implement in C/C++ code
rkevinr> public native String[] getKernelStuff();
rkevinr> }
rkevinr>
rkevinr> which would result in a C function name for getKernelStuff() that includes
rkevinr> both the package and class names:
rkevinr>
rkevinr> #include <jni.h>
rkevinr>
rkevinr> JNIEXPORT jobjectArray JNICALL Java_Enclosure_Wrapper_getKernelStuff
rkevinr> (JNIEnv *env, jobject theObj) {
rkevinr>
rkevinr> // ...
rkevinr> }
rkevinr>
rkevinr>
rkevinr> You can pass Java data types to your C code, and xfer/convert Java/C data
rkevinr> types in both directions.
rkevinr>
rkevinr> Build your C/C++ code as a shared library, then load that library via Java
rkevinr> using the System.loadLibrary("shortLibName") function, as in:
rkevinr>
rkevinr> public class TestTheWrapper {
rkevinr>
rkevinr> public static void main(String[] argv) {
rkevinr> // this actually loads libWrap.so
rkevinr> // (name is platform neutral -- pre/suffixes
rkevinr> // are added implicitly
rkevinr> System.loadLibrary("Wrap");
rkevinr> Enclosure.Wrapper w = new Enclosure.Wrapper();
rkevinr> w.getKernelStuff();
rkevinr> }
rkevinr> }
rkevinr>
rkevinr>
rkevinr> ----------------------------------------------------------------------
rkevinr> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
rkevinr> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]