[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AIX JNI Link with G++ module Problem
From: |
chriskr7 |
Subject: |
AIX JNI Link with G++ module Problem |
Date: |
12 Jul 2006 19:33:53 -0700 |
User-agent: |
G2/0.2 |
Hi, I changed C source to C++ source and compiled with g++.
The output file is .so module which java source calls JNI native
function in the
source.
However, when aix server restart and try to call native funtion, there
is the error
like this : java.lang.UnsatisfiedLinkError. and... when I try
again, the error
changes to java.lang.NoClassDefFoundError.
My c++ source code are fully tested except for JNI related function
calls.
Is there something wrong with this jni part or :
jint iPathSize = env->GetArrayLength(savepath);
jint iNameSize = env->GetArrayLength(filename);
jint iSourceSize = env->GetArrayLength(source);
jbyte * aSavePath = env->GetByteArrayElements(savepath, 0);
jbyte * aFileName = env->GetByteArrayElements(filename, 0);
jbyte * aSource = env->GetByteArrayElements(source, 0);
//....do some stuffs
env->ReleaseByteArrayElements(savepath, aSavePath, 0);
env->ReleaseByteArrayElements(filename, aFileName, 0);
env->ReleaseByteArrayElements(source, aSource, 0);
is there something I should set in java for using c++ jni function?
please help me T.T any ideas?
enviroment: AIX 5.1 gcc 4.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- AIX JNI Link with G++ module Problem,
chriskr7 <=