Is there an alternative to JNI on MacOS?
Location: http://www.jguru.com/faq/view.jsp?EID=493314 Created: Sep 8, 2001 Author: Davanum Srinivas (http://www.jguru.com/guru/viewbio.jsp?EID=2011) If you want to call Mac OS C code from your Java code, there are currently two mechanisms for doing so: JDirect2 and the Java Native Interface (JNI). Each has advantages and disadvantages. Generally you would want to use JNI if: • You are writing your Java code and C code concurrently • You want your code to be cross-platform • You need to access full Java functionality from your C code (for example, if you need to manipulate Java objects in C) JDirect is useful if: • You want to call older C functions from Java, or code whose source you cannot change (for example, legacy code or system software functions).