Re: Can't find my own exception class via JNI



On Wed, 30 Nov 2005 08:18:38 GMT, Paul J. Lucas wrote:
> It was a mistake in my transcription to Usenet. The function
> should have been (and actually is):
>
> jclass findClassOrDie( JNIEnv *env, char const *name ) {
> jclass const theClass = env->FindClass( name );
> if ( !theClass ) {
> cerr << "FindClass(" << name << ") failed" << endl;
> exit( 1 );
> }
> return theClass;
> }

In that case, and assuming that "name" contains the correct name and
spelling of your exception class (in the form you posted at the start
of this thread), then I would start by seeing what ExceptionDescribe()
says when FindClass() fails.

Also try using some JVM arguments like -verbose:class and -verbose:jni
to see if that gives you any more clues.

Finally, re-check the classpath and location of the class...

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.