Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #7126
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!o11g2000yql.googlegroups.com!not-for-mail |
|---|---|
| From | Danno <danmwall-google@yahoo.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | JNI accessing a class that instantiates another class |
| Date | Mon, 15 Aug 2011 07:55:50 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 14 |
| Message-ID | <d48afffd-0ff8-4cc4-a63b-45ffe01224e9@o11g2000yql.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 67.85.27.166 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1313420245 26843 127.0.0.1 (15 Aug 2011 14:57:25 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Mon, 15 Aug 2011 14:57:25 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | o11g2000yql.googlegroups.com; posting-host=67.85.27.166; posting-account=iVLLwgoAAADQwAV2QwJN1sl3KRiEe47W |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-Header-Order | HUALESNKRC |
| X-HTTP-UserAgent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7126 |
Show key headers only | View raw
I'm taking my first stab at JNI. I have a main Java class that instantiates another class. In my C++ code, I am using the FindClass function for the main class and calling the method in the main class using GetStaticMethodId/CallStaticIntMethod. The C++ code is successfully finding the Java class and calling the method that I specified in the GetStaticMethoId function. The only problem is, when the Java class attempts to create an instance of this second, inner class, it dies. I don't get an error, it just doesn't work. My question is... Do I need another FindClass statement for the second class even though the C++ code is not invoking the second class directly? If so, how would I do that? Thanks so much for your insight!
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
JNI accessing a class that instantiates another class Danno <danmwall-google@yahoo.com> - 2011-08-15 07:55 -0700
Re: JNI accessing a class that instantiates another class Florian Weimer <fw@deneb.enyo.de> - 2011-08-15 19:06 +0200
Re: JNI accessing a class that instantiates another class Danno <danmwall-google@yahoo.com> - 2011-08-15 12:28 -0700
Re: JNI accessing a class that instantiates another class Florian Weimer <fw@deneb.enyo.de> - 2011-08-15 21:50 +0200
Re: JNI accessing a class that instantiates another class Roedy Green <see_website@mindprod.com.invalid> - 2011-08-15 15:10 -0700
csiph-web