Java Interface to External FunctionsInvoke operating system APIs and functions from native code DLLs/shared libraries directly from your Java code without any JNI programming
On August 20, 2011, we have re-released xFunction under a freeware license and ceased its further development. We shall continue supporting xFunction customers that have purchased a commercial license for twelve months since that date.
We therefore encourage you to look first at JNA (Java Native Access), which provides essentially the same functionality as xFunction, is available for more platforms, and is open sourced under LGPL.
If JNA does not work for you or you cannot use LGPL software, please feel free to give xFunction a try. We may even port it to a platform of your choice upon request, at your expense.
For the avoidance of doubt, our flagship product, Excelsior JET, is and shall remain our top priority.
The xFunction library is the universal solution for integration of Java code with code written in other languages, superior in many aspects to Java Native Interface (JNI). At the same time, xFunction itself is implemented using JNI and reflection and therefore is 100% Java 2 Runtime compatible.
With xFunction, you no longer need to implement those ugly native methods. Instead, you extend and instantiate xFunction classes to create conventional Java objects representing external functions, data structures, pointers, and callbacks. All necessary data conversions and external function calls are done seamlessly by the xFunction library:
import com.excelsior.xFunction.*; ... /* Call Beep() from KERNEL32.DLL */ xFunction f = new xFunction( "kernel32", "int Beep(int,int)" ); f.invoke( new Argument(1770), new Argument(100) );
xFunction enables you to call any operating system APIs or functions exported from DLLs/shared libraries from your Java code in a natural and convenient manner. Using xFunction, you may achieve the highest levels of code reuse without translating any source code to Java and/or writing cumbersome JNI-conformant wrappers for your native code functions and APIs.
xFunction is available for Windows and Linux on the Intel x86 hardware, It may be used on the 64-bit versions of these platforms, but only in conjunction with a 32-bit Java implementation.