Re: Can't find my own exception class via JNI
- From: Gordon Beaton <not@xxxxxxxxx>
- Date: 30 Nov 2005 09:37:59 +0200
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
.
- References:
- Can't find my own exception class via JNI
- From: Paul J. Lucas
- Re: Can't find my own exception class via JNI
- From: Gordon Beaton
- Re: Can't find my own exception class via JNI
- From: Paul J. Lucas
- Can't find my own exception class via JNI
- Prev by Date: Re: Rethrowing an exception via JNI ?
- Next by Date: Java diff viewer Component?
- Previous by thread: Re: Can't find my own exception class via JNI
- Next by thread: access classes in nested jar
- Index(es):