This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Calling a Java function from C++ using CNI
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Shaun Jackman <sjackman at telus dot net>
- Cc: GCJ <java at gcc dot gnu dot org>
- Date: Tue, 10 Aug 2004 11:11:50 +0530
- Subject: Re: Calling a Java function from C++ using CNI
- References: <200408091931.39714.sjackman@telus.net>
Shaun Jackman wrote:
> [hello.cc]
> #include "HelloWorld.h"
>
> int
> main()
> {
> HelloWorld::hello();
> return 0;
> }
> [EOF]
I am not that familiar with CNI, but surely you must
initialise the Java runtime:
http://gcc.gnu.org/onlinedocs/gcj/Invocation.html
(See also the example at the bottom.)
Hope this helps,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/