Article View: borland.public.jbuilder.java.api
Article #910Re: Borland C++ Compiler / Java Bug with JNI?
From: John McGrath TeamB
Date: Fri, 23 Aug 2002 05:41
Date: Fri, 23 Aug 2002 05:41
24 lines
1701 bytes
1701 bytes
On 13 Aug 2002 21:52:14 -0700, Raffi Ismail wrote:
> JNIEXPORT void JNICALL Java_Ryno_setInputValues (
> JNIEnv *env, jobject obj, jint _n, jfloatArray _v)
> jfloat *tmp = (*env)->GetFloatArrayElements( ...
> I know what the error means but this code has been adapted from
> Sun's tutorials. *env is a pointer, so what happened?
My C++ is rather rusty, but I do not think that is right. "env" is a
pointer to a JNIEnv, so "*env" is a JNIEnv, not a pointer to one. So
I think this should be:
jfloat *tmp = env->GetFloatArrayElements( ...
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.17cf9525b5fcf13b98b965@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3d59e1fe$1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,ca40a8a8212c8bd7 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-08-22 23:16:50 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.api Subject: Re: Borland C++ Compiler / Java Bug with JNI? Date: Fri, 23 Aug 2002 01:41:49 -0400 Message-ID: <MPG.17cf9525b5fcf13b98b965@newsgroups.borland.com> References: <3d59e1fe$1@dnews> X-Newsreader: MicroPlanet Gravity v2.60 NNTP-Posting-Host: 151.197.229.46 X-Trace: newsgroups.borland.com 1030081308 151.197.229.46 (22 Aug 2002 22:41:48 -0700) Lines: 24 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail