This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
'/' versus '.' and jni (was Does jni work?)
- To: java-discuss at sourceware dot cygnus dot com
- Subject: '/' versus '.' and jni (was Does jni work?)
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Fri, 26 Jan 2001 17:30:52 +0100
- Cc: Tom Tromey <tromey at redhat dot com>
- Reply-To: martin dot kahlert at infineon dot com
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.