2 messages in net.java.dev.jna.users[jna-users] VM core dump help
FromSent OnAttachments
abhi...@jpmchase.comSep 2, 2008 9:58 pm 
abhi...@jpmchase.comSep 3, 2008 5:24 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] VM core dump helpActions...
From:abhi...@jpmchase.com (abhi@jpmchase.com)
Date:Sep 2, 2008 9:58:16 pm
List:net.java.dev.jna.users

Hello,

I am trying to use jna to connect to a native shared library. The test "C" funtiion, Im connecting has a signature as below:

extern "C" double getFwdSwapRate ( int i_tradeDate, int numTenors, char **i_tenors, double *i_tenorRates, int i_expiryDate, const char *i_underlyingTenor ) { result = 4.0 + 1.0; return result ; }

The java signature to connect to the above "C" code is as below:

CSwapLib lib = (CSwapLib) Native.loadLibrary("SwapLib", CSwapLib.class);

double getFwdSwapRate( int tradeDate, int tenorCount, String[] tenors, double[] tenorRates, int i_exiryDate, String underlyingTenor ); Im using java 1.5. When Im continuously connecting to the native code (in a loop), the VM gives a core dump after couple of tries. But when I run the VM with the flag " -Xint", the VM does not core dump. Any suggestions, help on this would be appreciated.

Thanks Abhi VM

----------------------------------------- This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.