Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Mac OS X JNI Revisited

Mac OS X for Java Geeks, was released. One section of the book that generated more questions and comments than almost any other was the section on JNI, or the Java Native Interface.

Tutorial Details:

JNI is the standard Java mechanism for interfacing Java applications with legacy C code. Standard Java code is bound to C-based libraries, with no changes or modification in your Java code required as you move between platforms. Generally speaking, it\'s considered good form to do some sanity checking when you attempt to load native code, and have your Java application either continue (possibly missing some native functionality) or gracefully exit if there is a failure.

In this article, we\'ll revisit the process of building a JNI project using the latest JDK 1.4.1, Apple\'s Project Builder, and the latest Java tools from Apple.
The main ones of interest are JNIWrapper.java and JNIExample141jnilib.c. These are the only files which are edited by hand -- you\'ll be putting your Java logic in the JNIWrapper.java file, and the C code in the JNIExample141jnilib.c file.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Mac OS X JNI Revisited

View Tutorial:
Mac OS X JNI Revisited

Related Tutorials:

Java Tip 66: Control browsers from your Java application - JavaWorld
Java Tip 66: Control browsers from your Java application - JavaWorld
 
Enhance your Java application with Java Native Interface (JNI)
Enhance your Java application with Java Native Interface (JNI)
 
Apple announces Java 2 plans at MacWorld
Apple announces Java 2 plans at MacWorld
 
Use the JVM Profiler Interface for accurate timing - JavaWorld
Use the JVM Profiler Interface for accurate timing - JavaWorld
 
Embed Java code into your native apps - JavaWorld May 2001
Embed Java code into your native apps - JavaWorld May 2001
 
Integrate Java and C++ with Jace
Integrate Java and C++ with Jace
 
Ilog JRules 4.0: Working by the rules
Ilog JRules 4.0: Working by the rules
 
Eclipse casts shadows
Eclipse casts shadows
 
Jabber away with instant messaging
Jabber away with instant messaging
 
Best tools for mobile application development
Best tools for mobile application development
 
Profiling CPU usage from within a Java application
Profiling CPU usage from within a Java application
 
High-availability mobile applications
High-availability mobile applications
 
good design pattern
good design pattern
 
Juggling JOGL
This article introduces the concepts in JOGL, the Java bindings to OpenGL, that are applicable to 2D gaming. We start with the handling of coordinate spaces and how they\'re scaled from the OpenGL world to the screen. Then we integrated JOGL\'s built-in A
 
Quaqua Look And Feel
Quaqua Look And Feel The Quaqua Look and Feel (Quaqua) is an implementation of Apple's Aqua Human Interface Guidelines in Java. Quaqua is not yet a self-contained look and feel. As Quaqua matures, it provides a steadily growing number of user elements
 
A Rendezvous with Java
A Rendezvous with Java During WWDC this year, Apple released Java source for Rendezvous. You can now write Java applications that can call on a Rendezvous service discovery on Mac OS X, Windows, and any POSIX system using code supplied by Apple. Apple in
 
JLAN Server v3.3
JLAN Server v3.3 JLAN Server is a high performance JavaTM based file server supporting Windows file sharing (SMB/CIFS), NFS and FTP protocols. Write your own virtual filesystems with the core server handling all protocol exchanges with the client. Incl
 
JTwain
JTwain will implement a Java interface to the the Win32 C DLL TWAIN acquire methods.
 
Streaming QuickTime with Java
This isn't an excerpt from my soon-to-be-released QuickTime for Java book, though now I wish it was.
 
Buy Peanut 9.6 Linux in India from us. Peanut 9.6 distribution is available in India.
Buy Peanut 9.6 Linux in India from us. Peanut 9.6 distribution is available in India. Peanut 9.6 Linux Now Available Peanut 9.6 Linux CD It is a Linux OS (operating system), especially made for those new to Linux. This is the most POWERFUL and
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.