473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

AIX JNI Link with G++ module Problem

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

Jul 13 '06 #1
1 2138
chriskr7 wrote:
[..]
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
Ask either in an AIX newsgroup or in Java newsgroup. This is not
a C++ language problem.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: thecrow | last post by:
I am trying to pass a connected db link into a class constructor. In the calling module, the link opens successfully and passes the is_resource test. If I pass the same link into a class...
3
by: Fortepianissimo | last post by:
Just started learning how to write a C extension module on Mac OS X. Here is a simple module taken from Programming Python: --- #include <Python.h> #include <string.h> /* module functions */...
2
by: faktujaa | last post by:
Hi All, I have to avoid cyclic reference in my DLLS. One way is to move the code to the common DLL. But now since i have written a lot of code, it would take a whole lot of time to do this. The...
1
by: Ron | last post by:
URGENT request: I have installed DB2 Version 8 (FP3) in W2K and then tried to compile/link a C program with embedded SQL, using a script: icc /c /Ti /Wd /dwin32...
2
by: TOM | last post by:
I am using C++.NET 2003. The appplication requires calling a device (a USB driver) that was compiled under C++ 6.0, and distributed as a binary (a .sys file) by the manufacturer. Some of the data...
2
by: swartzbill2000 | last post by:
Hello, I have a Solution with several Projects. One Project is is a driver to test code in a Module file in the main Project. The Module file is contained in the main Project and contained as a...
0
by: John Phelan-Cummings | last post by:
Goal: To improve an application's performance by basing sub forms on queries: The application has a front and back-end. There is no SQL server back-end involved. I use a module file for,...
12
by: rdemyan via AccessMonster.com | last post by:
I'm having a complicated linking problem. Before I get into the particulars, I'd like to know how Access links to the back-end file at startup, AFTER I've distributed my application to the client....
2
by: Davy | last post by:
Hi all, I have Python 2.4 and 2.5 in my PC. And PythonWin is installed as IDE. When I tried to use site-packages "Numpy", I installed the both version (i.e. for 2.4 and 2.5). Python 2.4 and...
8
by: Neil | last post by:
I just started using Access 2003, and I can't link a SQL Server table. I right-click on the database window; select Link Tables; and select ODBC Databases from the Files of Type dropdown. As soon...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.