Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Java > - BW_JNI_Test.s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 60 of 81
Post > Topic >>

- BW_JNI_Test.sit (0/1) Bus error inside OS X JNILIB whenever accessing JNIEnv env parameter

by Chuck King <chron410@[EMAIL PROTECTED] > Jun 4, 2005 at 04:17 AM

I am using CodeWarrior (CW) 8.3 on OS X.3.9 to create a [C++] jnilib
which my Java program loads with loadLibrary.

The jnilib is being found, and the JNI function is being called, but I
get a bus error anytime I access the JNIEnv "env" parameter such as in:

jclass clazz = env->GetObjectClass(myJStringParameter);  // bus error
anytime accessing env

The Java program is compiled with CW 8.3 inside the same project.

The OS X project was ****ted from a CW 6 project that works on Mac OS
9.1.

Running the program from within CodeWarrior or launching the .jar from
the Finder (using the Console utility to view the output) makes no
difference.

Compiling the Java program with rt.jar 1.3 or 1.4 makes no difference.

I reproduced the problem in 2 other similarly-coded projects, in
addition to the attached example.

On another machine, recompiling the jnilib with CW 9 resulted in the
same bus error, so if you solve for CW 9 the solution will most likely
work for CW 8.3.

I need a CW 8.3 solution (as opposed to a different IDE or version of
CW).

A sample trivial CW 8.3 Java/C++ project that demonstrates the problem
is attached.

-- 
Chuck King
Brainworks Software
 




 2 Posts in Topic:
- BW_JNI_Test.sit (0/1) Bus error inside OS X JNILIB whenever ac
Chuck King <chron410@[  2005-06-04 04:17:42 
Re: - BW_JNI_Test.sit (0/1) Bus error inside OS X JNILIB wheneve
MW Ron <mwron@[EMAIL P  2005-06-09 18:38:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 14:08:16 CDT 2008.