This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: CNI-Troubles.
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Clemens Eisserer <linuxhippy at web dot de>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 25 Aug 2003 14:42:24 -0400 (EDT)
- Subject: Re: CNI-Troubles.
On Mon, 25 Aug 2003, Clemens Eisserer wrote:
> Yes, I´m still having troubles. As far as I understand, I can directly
> use C++-Classes out of java.
Not really. In your example you are trying to define a Java class in C++.
It won't work. You must define the class in Java. Once you do you can
call it from C++ or Java.
> I dont understand whats wrong, althouhgt I cant imagine how GCJ should
> know how the C++-class looks like.
It doesn't. You must tell gcj about C++ methods by declaring them
`native'.
Jeff