Jump to content

Talk:Java Native Interface

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by AverageAmerican (talk | contribs) at 00:49, 8 May 2007 (answer to last post). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

noncompliant - Article is a tutorial, violates WP:NOT

This 'article' is a tutorial on the use of JNI. WP:NOT prohibits tutorials:

Instruction manuals - while Wikipedia has descriptions of people, places, and things, Wikipedia articles should not include instruction - advice ( legal, medical, or otherwise), suggestions, or contain "how-to"s. This includes tutorials, walk-throughs, instruction manuals, video game guides, and recipes.

(my emphasis).

Suggest reverting to 5 December 2005 edit by 212.85.24.83, which is the most recent edit before the tutorial content was added. LVC 12:16, 25 July 2006 (UTC)[reply]

One week has passed with no challenge on this - reverting. LVC 03:40, 2 August 2006 (UTC)[reply]
You removed too much useful information. I think reverting was a bad idea. It was probably better to just remove the walkthrought --Felipe Monteiro de Carvalho 19:03, 5 August 2006 (UTC)[reply]
As writer of the expansion of the article (stub), I was not aware of this Wikipedia policy at the time I wrote it. I have written it this way because JNI is hard to understand, even for advanced programmers who have never done something like this before. By providing an example, the programmer have a concrete example to work with. There is a ton of useful information on that article that I think will help others master JNI. I will rewrite the article that will not follow a sort of a "tutorial" style format, I will instead just provide a straight-up example, explains the inner mechanisms and provide a link to a proper tutorial if the reader needs to be. - User:AverageAmerican 12 August 2006
I have gotten rid of the walkthrough. I will see if I can write a more appropriate example that will conform to Wikipedia standards. In the meantime I have provided a link to CodeProject.com and Java.sun.com discussing how JNI is used. - User:AverageAmerican 12 August 2006

Is JNI an API or no?

The article reads at the first line, "The Java Native Interface (JNI) is a programming framework..." Then later on it states, "as mentioned before, the JNI is not an easy API to learn." Is JNI properly referred to as an API? I realize that API stands for "application program interface" which fairly describes JNI, but my understanding is that the term API usually refers to a hardware or operating system hook rather than a generic application-to-application communication pathway. Just curious. Thx.

To call and be called ?

The first sentence says JNI allows java code "to call and be called by native applications". Is there and example/tutorial anywhere on the web, showing java code being called by a native application? All the JNI examples I've been reading just show things happening the other way round (java invokes native). -- Harry Wood 17:00, 6 March 2007 (UTC)[reply]

Yes, native applications can invoke the java side - it can even create java objects and pass them on to java. It's more difficult of course, but it's most definately possible. You can take a look at http://www.iam.ubc.ca/guides/javatut99/native1.1/implementing/method.html hope this helps --AverageAmerican 00:49, 8 May 2007 (UTC)[reply]