Language integration

Joerg Brunsmann joerg_brunsmann@yahoo.de
Thu Apr 12 05:01:00 GMT 2001


Hi,
if someone wanted to write a 'component' in Java to
extend a 'legacy' application a naive and ad hoc
way to do is:
int main(int argc, char **) {
 jstring jstr = JvNewStringLatin1("A");
 jclass c = ::java::lang::Class::forName(jstr);
 ::java::lang::Object *o = c->newInstance();
 a->m(); 
} 
where A.java would be compiled as
$ gcj -shared -o A.so A.java
Is this possible? Am I missing something?
Noting that 'gij' calls the 'JvRunMain' function 
I'm asking myself what initialization must be 
run before a gcj compiled shared object can be 
used from other languages than gcj java.
Thanks in advance,
Jörg
__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de


More information about the Java mailing list

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