[Bug java/14212] Can't mix compiled and interpreted code with 3.3.3

stiles at siliconlogic dot com gcc-bugzilla@gcc.gnu.org
Thu Feb 19 18:37:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list