This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

'/' versus '.' and jni (was Does jni work?)


Hi!

The patch, Tom Tromey gave to me, yields to a working JNI
implementation, if (and only if) all slashes in signatures are
changed into dots (for methods like GetStaticFieldID).

This is not consistent: FindClass seems to work with both variants.

The documentation (i.e. tutorials) on JNI i found usually uses slashes.

Is this incompatibility intentional?

As far as i can tell, the signatures in the templates
_Jv_JNI_GetAnyMethodID and friends should be changed from
'/' into '.', because this seems to be gcj's standard notation and
thus makes the least trouble.

Unfortunately, i am very new to libjava and gcc development and perhaps
i would make things even worse.
But if there is nobody else interested into JNI, i would
volunteer to make the changes.
Warning: This would pollute java-discuss with silly questions!

It is important for me to use JNI not CNI, since the resulting interface
will be plugged into a large Fortran 77 application.
The hassle connecting Fortran to C (consistently on different platforms)
is enough for me, i don't need a further C++ layer, although personally 
i like CNI much more than JNI.

Thanks,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]