Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#54 jni FindClass bug, affects JClassImpl::getClass

closed-duplicate
nobody
None
5
2004-12-04
2004-07-28
Anonymous
No

There is a 'bug' (or documentation error) in the jni
method FindClass.

This:

jclass a_class = env->FindClass( "[java/lang/String" );

throws a NoClassDefFoundError, but this works fine:

jclass a_class = env->FindClass( "[Ljava/lang/String;" );

as does:

jclass a_class = env->FindClass( "Ljava/lang/String;" );

Therefore, in JClassImpl::getClass I think you need to
change to:

jclass localClass = env->FindClass( getNameAsType
().c_str() );

See also, JDC bug report 290129.

Discussion

  • Gili Tzabari
    Gili Tzabari
    2004-12-04

    Logged In: YES
    user_id=80628

    >See also, JDC bug report 290129.

    This bug ID does not seem to exist. Furthermore, this bug
    report is a duplicate. Please post future comments in the
    other report.

    Thank you,
    Gili

     
  • Gili Tzabari
    Gili Tzabari
    2004-12-04

    • status: open --> closed-duplicate