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]
Other format: [Raw text]

Re: internal compiler error: can't find class$


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


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