This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: examples/tutorial on CNI?
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Michael Purdy <mpurdy at BTBOCES dot ORG>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 27 Jun 2005 13:31:40 -0400
- Subject: Re: examples/tutorial on CNI?
- References: <s2bffa38.086@MAIN-EC-SRV4.btboces.org>
Michael Purdy wrote:
Are there any tutorials available describing how to take a java class, compile it to native code, then access it from a java app via CNI? I have found good documentation on using natively compiled java classes in C++ via CNI, but not in java via CNI... Or, would it be better to use JNI?
Are you are trying to create an application that consists of mixed
(interpreted) bytecode and native compiled Java? If so, you don't need
CNI (or JNI) - these are for interfacing between Java and C/C++ code.
With GCJ 4.0 you can use the BC-ABI to create a mixed bytecode/native
Java application. See this link for some instructions:
http://gcc.gnu.org/wiki/How%20to%20BC%20compile%20with%20GCJ
Bryce