This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: internal compiler error: can't find class$
- From: Tom Tromey <tromey at redhat dot com>
- To: Thomas Léauté <thleaute at csail dot mit dot edu>
- Cc: java at gcc dot gnu dot org
- Date: 02 Sep 2004 09:40:05 -0600
- Subject: Re: internal compiler error: can't find class$
- References: <708FA598-FCF6-11D8-AF02-000A95E30B44@csail.mit.edu>
- Reply-to: tromey at redhat dot com
>>>>> "Thomas" == Thomas Léauté <thleaute@csail.mit.edu> writes:
Thomas> Here I am instantiating a new "coutUI" object; coutUI is a c++ class
Thomas> which is a sub-class of the java interface OutputInterface,
Thomas> implemented in the OutputInterface.java file:
If I understand correctly, coutUI is entirely written in C++.
However, you can't derive a pure C++ class from a Java class.
The reason is, a Java class has a bunch of metadata associated with it
(the Class instance, various reflection tables, etc) that g++ doesn't
know how to generate. While it would most likely be possible to
implement this, nobody has done it, and it has always been a very low
priority for us.
Instead of doing this, just write your class in Java and mark all the
methods as native. gcj will generate the metadata and all will be
well.
Tom