DL (Java-Python Bridge 0.8 Java API)
Date: 2015-11-20

org.jpy

## Class DL

- java.lang.Object
- - org.jpy.DL

-     public class DL
      extends Object

  A replacement for `System.load(String)` with support for POSIX `dlopen` flags.

  Important note: This class is useful on POSIX (Unix/Linux) systems only. On Windows OSes, all methods are no-ops.

  Since:
    0.7
  See Also:
    dlopen(3) - Linux manual page

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `RTLD_GLOBAL` External symbols defined in the library will be made available to subsequently loaded libraries.
    `static int` | `RTLD_LAZY` Resolve undefined symbols as code from the dynamic library is executed.
    `static int` | `RTLD_LOCAL` This is the converse of RTLD_GLOBAL, and the default if neither flag is specified.
    `static int` | `RTLD_NOW` Resolve all undefined symbols before `dlopen(java.lang.String, int)` returns and fail if this cannot be done.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DL()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `dlclose(long handle)`
    `static String` | `dlerror()`
    `static long` | `dlopen(String filename, int flag)` loads the dynamic library file named by the null-terminated string filename and returns an opaque "handle" for the dynamic library.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### RTLD_LAZY

          public static final int RTLD_LAZY

      Resolve undefined symbols as code from the dynamic library is executed.
      See Also:
        Constant Field Values

    - #### RTLD_NOW

          public static final int RTLD_NOW

      Resolve all undefined symbols before `dlopen(java.lang.String, int)` returns and fail if this cannot be done.
      See Also:
        Constant Field Values

    - #### RTLD_LOCAL

          public static final int RTLD_LOCAL

      This is the converse of RTLD_GLOBAL, and the default if neither flag is specified.
      See Also:
        Constant Field Values

    - #### RTLD_GLOBAL

          public static final int RTLD_GLOBAL

      External symbols defined in the library will be made available to subsequently loaded libraries.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DL

          public DL()

  - ### Method Detail

    - #### dlopen

          public static long dlopen(String filename,
                                    int flag)

      loads the dynamic library file named by the null-terminated string filename and returns an opaque "handle" for the dynamic library. If filename is `null`, then the returned handle is for the main program. If filename contains a slash ("/"), then it is interpreted as a (relative or absolute) pathname.
      Parameters:
        `filename` - dynamic library filename or `null`
        `flag` - combination of `RTLD_GLOBAL` or `RTLD_LOCAL` with `RTLD_LAZY`, `RTLD_NOW`.
      Returns:
        opaque "handle" for the dynamic library.

    - #### dlclose

          public static int dlclose(long handle)

    - #### dlerror

          public static String dlerror()

Copyright © 2014–2015 Brockmann Consult GmbH. All rights reserved.