org.jpy

## Class PyLibInitializer

- java.lang.Object
- - org.jpy.PyLibInitializer

-     public class PyLibInitializer
      extends Object

  This helper class is to safely and programmatically configure jpy. Configuration of `PyLib` is done at class initialization time via system properties. This is a potentially delicate time in the lifecycle of a program - and errors around order of initialization can be hard to track down. To safely and programmatically configure jpy, we must ensure that we are the ones causing the initialization of `PyLib` (and `DL`).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PyLibInitializer()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `initPyLib(String pyLib, String jpyLib, String jdlLib)` This method should only be called once - it is dependent on `PyLib` and `DL` being uninitialized.
    `static boolean` | `isDlInitialized()` Returns true iff the `DL` class has been initialized
    `static boolean` | `isPyLibInitialized()` Returns true iff the `PyLib` class has been initialized

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

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

- - ### Constructor Detail

    - #### PyLibInitializer

          public PyLibInitializer()

  - ### Method Detail

    - #### isPyLibInitialized

          public static boolean isPyLibInitialized()

      Returns true iff the `PyLib` class has been initialized

    - #### isDlInitialized

          public static boolean isDlInitialized()

      Returns true iff the `DL` class has been initialized

    - #### initPyLib

          public static void initPyLib(String pyLib,
                                       String jpyLib,
                                       String jdlLib)

      This method should only be called once - it is dependent on `PyLib` and `DL` being uninitialized. Any consumers who want to programmatically configure jpy should call this method first.
      Parameters:
        `pyLib` - the python library
        `jpyLib` - the jpy library
        `jdlLib` - the jdl library

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