![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with a Network Interface | aldowsary | AIX | 7 | 10-09-2007 06:26 PM |
| network interface problem solaris 2.5 | kroegand | SUN Solaris | 0 | 05-25-2006 10:11 PM |
| problem in new debian installation | gauri_agr | UNIX for Dummies Questions & Answers | 5 | 01-23-2006 10:20 PM |
| network interface problem | sc2005 | UNIX for Advanced & Expert Users | 6 | 08-07-2005 08:59 PM |
| Debian aptitude - apt-get problem | mikek147 | UNIX for Advanced & Expert Users | 1 | 09-15-2002 05:13 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Problem using Java Native Interface on Debian
Hi all,
First visit to this forum, hope I've chosen an appropriate place to post this. I have a Java-based application that uses native C++ libraries (built with g++-4.0) for specialized, computation-intensive routines. Within the native code, I need to catch exceptions thrown inside called methods and throw a corresponding Java exception back to the JVM. This used to work just fine. But I am performing a rebuild after some time has past, and our platform itself (Debian testing) has had some upgrades (to glibc, etc.). Consequently, the desired functionality seems to be broken. The exceptions are not being caught in the new build. Note: the same code built and tested on MS Windows platforms works just as expected. Here is a snippet some of the code that is failing: Code:
/*
* Class: informeta_mentys_api_license_FileLicense
* Method: nativeReadExpiry
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_informeta_mentys_api_license_FileLicense_nativeRea
(JNIEnv *env, jclass cls)
{
jlong expiry(0);
try
{
expiry = FileLicense::getInstance().readExpiry();
}
catch (LicenseException& e)
{
env->ThrowNew(Class_LicenseException, e.getMessage().c_str());
}
catch (JNIException&)
{
// Do nothing; exception already pending from failed JNI call
}
catch (...)
{
env->ThrowNew(Class_LicenseException, "unidentified runtime error");
}
return expiry;
}
Code:
terminate called after throwing an instance of 'informeta::mentys::security::LicenseException' Matthew P.S. I now realize that this is a poor choice of forum for my question. If it would be more appropriate, could a moderator please move this to Network Computing Topics > C Programming in the UNIX Environment. I see there is a g++-4.0 thread over there. Sorry. Last edited by QED; 01-25-2006 at 08:20 AM. |
|||
| Google UNIX.COM |
| Forum Sponsor | ||
|
|