Language integration

Tom Tromey tromey@redhat.com
Thu Apr 12 10:07:00 GMT 2001


>>>>> "Joerg" == Joerg Brunsmann <joerg_brunsmann@yahoo.de> writes:

Joerg> int main(int argc, char **) {
Joerg> jstring jstr = JvNewStringLatin1("A");
Joerg> jclass c = ::java::lang::Class::forName(jstr);
Joerg> ::java::lang::Object *o = c->newInstance();
Joerg> a-> m(); 
Joerg> } 
Joerg> Is this possible? Am I missing something?
This doesn't work right now. main() has to do some special
initialization stuff.
Eventually we'll write a CNI version of the invocation API. That will
let something like the above work.
If you're really interested in this you could design and implement it.
I could provide some guidance on how we'd like it to be done
(basically: more or less a CNI variant of the JNI invocation API).
Joerg> Noting that 'gij' calls the 'JvRunMain' function 
Joerg> I'm asking myself what initialization must be 
Joerg> run before a gcj compiled shared object can be 
Joerg> used from other languages than gcj java.
Take a look at the implementation of JvRunMain. That will tell you
what has to be done.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /