Home Java • Download Java Native Interface: Programmer's Guide and Specification by Sheng Liang PDF

Download Java Native Interface: Programmer's Guide and Specification by Sheng Liang PDF

By Sheng Liang

The Java local Interface (JNI) allows the mixing of code written within the Java programming language with code written in different languages resembling C and C++. It permits programmers to take complete benefit of the Java platform with no need to desert their funding in legacy code. This e-book is the definitive source and a accomplished consultant to operating with the JNI. totally updated, the ebook bargains an educational, an in depth description of JNI positive factors and programming options, JNI layout justifications, and the respectable specification for all JNI varieties and services.

Show description

Read or Download Java Native Interface: Programmer's Guide and Specification PDF

Similar java books

Java For Dummies

Begin construction robust courses with Java 6—fast!

Get an outline of Java 6 and start development your individual programs
Even if you're new to Java programming—or to programming in general—you can wake up and working in this wildly renowned language in a rush. This e-book makes it effortless! From how you can set up and run Java to knowing sessions and gadgets and juggling values with arrays and collections, you'll get in control at the new positive aspects of Java 6 in no time.

Discover how to
* Use object-oriented programming
* paintings with the alterations in Java 6 and JDK 6
* store time through reusing code
* combine Java and Javascript with the recent scripting tools
* Troubleshoot code difficulties and attach insects

Java in a Nutshell (6th Edition)

The newest version of Java in a Nutshell is designed to aid skilled Java programmers get the main out of Java 7 and eight, yet it’s additionally a studying course for brand new builders. Chock choked with examples that exhibit the best way to take whole good thing about glossy Java APIs and improvement most sensible practices, the 1st component of this completely up to date booklet offers a fast paced, no-fluff creation to the Java programming language and the middle runtime facets of the Java platform.

Practical JIRA Administration

If youre conversant in JIRA for factor monitoring, computer virus monitoring, and different makes use of, you recognize it could possibly occasionally be tough to establish and deal with. during this concise ebook, software program toolsmith Matt Doar solutions tough and frequently-asked questions on JIRA management, and indicates you ways JIRA is meant for use.

Liferay 6.x Portal Enterprise Intranets Cookbook

Over 60 hands-on recipes that will help you successfully create advanced and hugely customized firm intranet ideas with Liferay Portal 6. x CE approximately This BookLearn the best way to use Liferay Portal to create a completely useful intranet company with a transparent constitution and database of all departments and staff of your companySave some time and cash by means of taking keep watch over of your facts, records, and enterprise processesPacked with step by step, real-world examples that can assist you with the install, deployment, and configuration of Liferay and that will help you run robust instruments to your staff or clientsWho This ebook Is ForIf you're a Java developer or administrator with a technical heritage and need to put in and configure Liferay Portal as an company intranet, this is often the e-book for you.

Extra info for Java Native Interface: Programmer's Guide and Specification

Sample text

The garbage collection request will be blocked until the current thread executes ReleaseStringCritical, which cannot happen until the fprintf call returns. The fprintf call is waiting, however, for thread T to finish reading from the file handle. The following code, although similar to the example above, is almost certainly deadlock free: /* This code segment is OK. */ const char *c_str = (*env)->GetStringCritical(env, j_str, 0); if (c_str == NULL) { ... 3 DrawString is a system call that directly writes the string onto the screen.

For example, if the method you called back returned a value of type int, then your native method would use CallIntMethod. String instances and arrays. You can use CallMethod family of functions to invoke interface methods as well. You must derive the method ID from the interface type. Thread instance */ jmethodID mid; jclass runnableIntf = (*env)->FindClass(env, "java/lang/Runnable"); if (runnableIntf == NULL) { ... /* error handling */ } mid = (*env)->GetMethodID(env, runnableIntf, "run", "()V"); if (mid == NULL) { ...

You can then invoke the constructor by passing the method ID to JNI functions such as NewObject.

Download PDF sample

Rated 4.29 of 5 – based on 28 votes
In Java