Incorrect Java methods called from CNI

Bryce McKinlay mckinlay@redhat.com
Thu May 13 16:57:00 GMT 2004


Dave Menendez wrote:

>Cleaned everything and tried to build again, but got the following
>compiler error when compiling Classification.cpp:
>
>
>In file included from
>./jblocks/security/classification/Classification.h:8,
>                 from Classification.cpp:7:
>./jblocks/security/classification/AbstractClassificationModel.h:30:
>error: Java method 'jblocks::security::classification::Classification*
>jblocks::security::classification::AbstractClassificationModel::getClassification()' has non-Java return type `jblocks::security::classification::Classification*'
>
>Which isn't true - the line that was added to
>AbstractClassificationModel.h by gcjh was the following:
>
>  virtual ::jblocks::security::classification::Classification
>*getClassification () = 0;
>
>...and there's an appropriate forward declaration for Classification in
>the extern "Java" block in the correct namespace.
>  
>

Strange - I'm not sure what would cause that. Perhaps try including 
AbstractClassificationModel.h directly from your .cpp file, although I 
guess that shouldn't be neccessary.

FYI I filed a bug report with test case for the original problem, here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15411

Regards

Bryce



More information about the Java mailing list