Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25380

Re: JNI Invocation API example

From "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org>
Newsgroups comp.lang.java.programmer
References <ef9f31ab-60a2-4cd5-b957-a9281fedd079@googlegroups.com>
Subject Re: JNI Invocation API example
Date 2013-09-28 14:40 +0100
Message-ID <lfednXqjANjuQdvPnZ2dnUVZ7qWdnZ2d@bt.com> (permalink)

Show all headers | View raw


Kenneth Miller wrote:

> What method invocation is appropriate for the println method? I'm certain
> that it isn't CallStaticVoidMethod, because that currently gives me a
> segfault.

It looks to me as if you might benefit from learning a little more Java first.

Try writing a "Hello World" program in Java, then see the difference between 
what the Java program is telling the JVM to do, and what your JNI code is 
(attempting) to tell the JVM to do.  In particular println() is not a static 
method, and as such you need an instance of PrintStream.

By the way: you might want to have a look at "jace", 
http://code.google.com/p/jace/wiki/Overview (caveat: I haven't used it myself).

    -- chris 

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JNI Invocation API example Kenneth Miller <kennethadammiller@gmail.com> - 2013-09-25 10:23 -0700
  Re: JNI Invocation API example Mark <i@dontgetlotsofspamanymore.invalid> - 2013-09-27 16:44 +0100
  Re: JNI Invocation API example "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-09-28 14:40 +0100
    Re: JNI Invocation API example Kenneth Miller <kennethadammiller@gmail.com> - 2013-09-28 16:22 -0700
      Re: JNI Invocation API example Lew <lewbloch@gmail.com> - 2013-09-30 11:20 -0700
  Re: JNI Invocation API example Roedy Green <see_website@mindprod.com.invalid> - 2013-10-01 21:48 -0700

csiph-web