This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/14212] Can't mix compiled and interpreted code with 3.3.3
- From: "stiles at siliconlogic dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2004 18:37:58 -0000
- Subject: [Bug java/14212] Can't mix compiled and interpreted code with 3.3.3
- References: <20040219155545.14212.stiles@siliconlogic.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From stiles at siliconlogic dot com 2004-02-19 18:37 -------
Why did it work in 3.2.3? Item 1.7 in the faq implies that this should work.
Item 1.7 from the gcj faq:
Can I interface byte-compiled and native java code
libgcj has a bytecode interpreter that allows you to mix .class files with
compiled code. It works pretty transparently: if a compiled version of a class
is not found in the application binary or linked shared libraries, the class
loader will search for a bytecode version in your classpath, much like a VM
would. Be sure to build libgcj with the --enable-interpreter option to enable
this functionality.
The program "gij" provides a front end to the interpreter that behaves much
like a traditional virtual machine. You can even use "gij" to run a shared
library which is compiled from java code and contains a main method:
$ gcj -shared -o lib-HelloWorld.so HelloWorld.java
$ gij HelloWorld
This works because gij uses Class.forName, which knows how to load shared
objects.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14212