Super    Next

Introduction

The xFunction library allows you to call external functions, implemented in any language and residing in DLLs or shared libraries, from your Java program. With xFunction, you do not need to implement native methods operating through Java Native Interface (JNI). 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 to Beep(1770,100) from KERNEL32.DLL */
    xFunction f=new xFunction("kernel32", "int Beep(int,int)");
    f.invoke(new Argument(1770),new Argument(100));

xFunction provides you with the following capabilities:

Note: The xFunction library is NOT intended for implementation of address arithmetic in Java.


Super Prev Next

New in version 2.17

The following bugs were fixed:


Super Prev Next

New in version 2.16

The following bugs were fixed:


Super Prev Next

New in version 2.15

This is a maintenance release fixing the following problem:


Super Prev Next

New in version 2.14

This is a maintenance release fixing the following problems:


Super Prev Next

New in version 2.13

This is a maintenance release that addresses several customer issues.


Super Prev Next

New in version 2.12


Super Prev Next

New in version 2.1


Super Prev Next

New in version 2.0


Super Prev Next

Portability issues

If your Java program is truly portable, i.e. it does not contain native methods, you do need neither xFunction nor JNI or other native interface. Otherwise, it does not really matter whether you use xFunction or a native interface — you still need to port the native code part of your program.