MFV3D Book Archive > 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) permits the combination of code written within the Java programming language with code written in different languages resembling C and C++. It permits programmers to take complete good thing about the Java platform with no need to desert their funding in legacy code. This ebook is the definitive source and a complete consultant to operating with the JNI. solely up to date, the publication deals an educational, an in depth description of JNI gains and programming innovations, JNI layout justifications, and the reputable specification for all JNI kinds and services.

Show description

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

Similar java books

Java EE 6 Development with NetBeans 7

The e-book is a realistic advisor explaining a few of the good points of the NetBeans IDE relating to company software improvement. The booklet is aimed toward Java builders who desire to enhance Java EE purposes whereas profiting from NetBeans performance to automate repetitive initiatives and to ease their software program improvement efforts.

Java Transaction Design Strategies

Even though it isn't an exceptional ebook nor it is going to be the bible of not anything, the booklet is sort of transparent. i love much the right way to clarify transaction innovations and different strategies.

It is an effective e-book.

Spring Web Services 2 Cookbook

It is a cookbook filled with recipes with the basic code defined essentially and comprehensively. each one bankruptcy is well compartmentalized with targeted recipes that are completely geared up for simple reference and realizing. This booklet is for Java/J2EE builders. because the books covers various subject matters in Web-Service improvement, it's going to function a reference advisor to these already acquainted with Web-Services.

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

Example text

You can use the javap tool (shipped with JDK or Java 2 SDK releases) to generate the field descriptors from class files. Normally javap prints out the method and field types in a given class. If you specify the -s option (and the -p option for exposing private members), javap prints JNI descriptors instead: javap -s -p InstanceFieldAccess This gives you output containing the JNI descriptors for the field s: ... s Ljava/lang/String; ... Using the javap tool helps eliminate mistakes that can occur from deriving JNI descriptor strings by hand.

To call a instance method defined in a superclass, you do the following: • Obtain the method ID from a reference to the superclass using GetMethodID, as opposed to GetStaticMethodID. • Pass the object, superclass, method ID, and arguments to one of the family of nonvirtual invocation functions, such as CallNonvirtualVoidMethod, CallNonvirtualBooleanMethod, and so on. It is relatively rare that you will need to invoke the instance methods of a superclass. f(); CallNonvirtualVoidMethod can also be used to invoke constructors, as the next section will illustrate.

May return a copy of the string. 1 GetStringLength Returns the number of Unicode characters in the string. 1 GetStringUTFLength Returns the number of bytes needed (not including the trailing 0) to represent a string in the UTF-8 format. String instance that contains the same sequence of characters as the given Unicode C string. String instance that contains the same sequence of characters as the given UTF-8 encoded C string. 1 GetStringCritical ReleaseStringCritical Obtains a pointer to the contents of a string in Unicode format.

Download PDF sample

Rated 4.46 of 5 – based on 41 votes