This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Language integration
- To: java at gcc dot gnu dot org
- Subject: Language integration
- From: Joerg Brunsmann <joerg_brunsmann at yahoo dot de>
- Date: Thu, 12 Apr 2001 12:15:03 +0200 (CEST)
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