Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #22829 > unrolled thread
| Started by | bob smith <bob@coolfone.comze.com> |
|---|---|
| First post | 2013-03-08 13:38 -0800 |
| Last post | 2013-03-08 14:36 -0800 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
jni nomemclature bob smith <bob@coolfone.comze.com> - 2013-03-08 13:38 -0800
Re: jni nomemclature Arne Vajhøj <arne@vajhoej.dk> - 2013-03-08 17:31 -0500
Re: jni nomemclature Roedy Green <see_website@mindprod.com.invalid> - 2013-03-08 14:36 -0800
| From | bob smith <bob@coolfone.comze.com> |
|---|---|
| Date | 2013-03-08 13:38 -0800 |
| Subject | jni nomemclature |
| Message-ID | <f2e332eb-ba36-4457-ba6c-a547bd64800a@googlegroups.com> |
When using JNI, how do you know if the package name will appear in the C method name? For instance, if you have a method named save() in class Canvas in package android.graphics, which is the correct JNI name? Java_android_graphics_Canvas_save or Java_Canvas_save ? Thanks.
[toc] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2013-03-08 17:31 -0500 |
| Message-ID | <513a66ad$0$32115$14726298@news.sunsite.dk> |
| In reply to | #22829 |
On 3/8/2013 4:38 PM, bob smith wrote: > When using JNI, how do you know if the package name will appear in the C method name? > > For instance, if you have a method named save() in class Canvas in package android.graphics, which is the correct JNI name? > > Java_android_graphics_Canvas_save > > or > > Java_Canvas_save > > ? Typical you generate the header file and see the name there. But the package name is used. It is documented here: http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/design.html#wp615 Arne
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2013-03-08 14:36 -0800 |
| Message-ID | <0upkj8t602ioh02bcvrgb121m4mer6ns9u@4ax.com> |
| In reply to | #22829 |
On Fri, 8 Mar 2013 13:38:53 -0800 (PST), bob smith <bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone who said : >For instance, if you have a method named save() in class Canvas in package android.graphics, which is the correct JNI name? you run javah and have a look at the C names it generates. see http://mindprod.com/jgloss/jni.html -- Roedy Green Canadian Mind Products http://mindprod.com Software gets slower faster than hardware gets faster. ~ Niklaus Wirth (born: 1934-02-15 age: 79) Wirth’s Law
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web