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.
Invoke operating system APIs and functions from native code
DLLs/shared libraries directly from your Java code without any JNI programming
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:
| Code: |
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) );
|
Available for Windows, Linux and Mac OS X , 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 (edited)bersome JNI-conformant wrappers for your native code
functions and APIs.
The xFunction library enhances your multilanguage development capabilities
with:
- calls of external functions from Java code
- calls of Java methods from external functions ( callbacks )
- simulation of C-compatible structures
- simulation of pointers
- passing of input and output parameters of different types (primitive
types, strings, structures, arrays, callbacks)
Note: The xFunction library is NOT intended for implementation of
address arithmetic in Java.