This is the mail archive of the java@gcc.gnu.org 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]

Language integration


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


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