This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Print a Java String
- From: Tom Tromey <tromey at redhat dot com>
- To: abhi123 <ac0030313 at techmahindra dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 05 Feb 2008 06:08:46 -0700
- Subject: Re: Print a Java String
- References: <15289889.post@talk.nabble.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> ">" == abhi123 <ac0030313@techmahindra.com> writes:
>> I am able to catch this e but cout<<e->toString() displays a address or some
>> hex output but I want to display the toString output. Is there a way to do
>> this any help is much appreciated.
You need to convert the Java String to a C string. See the CNI manual
for some information on this; it is pretty similar to how you would do
it using JNI.
Tom