loci.plugins.util

## Class LibraryChecker

- java.lang.Object
- - loci.plugins.util.LibraryChecker

-     public final class LibraryChecker
      extends java.lang.Object

  Utility methods for verifying that classes are present and versions are correct.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LibraryChecker.Library` List of possible libraries for which to check.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `IMAGEJ_MSG` Message to be displayed if ImageJ is too old for Bio-Formats plugins.
    `static java.lang.String` | `IMAGEJ_VERSION` Minimum version of ImageJ necessary for Bio-Formats plugins.
    `static java.lang.String` | `URL_BF_SOFTWARE` URL for Bio-Formats web page.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `LibraryChecker()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `checkClass(java.lang.String className)` Checks whether the given class is available.
    `static boolean` | `checkImageJ()` Checks whether ImageJ is new enough for the Bio-Formats plugins.
    `static boolean` | `checkImageJ(java.lang.String target, java.lang.String msg)` Returns true the current ImageJ version is greater than or equal to the specified version.
    `static boolean` | `checkImageJ(java.lang.String target, java.lang.String msg, java.lang.String title)` Returns true the current ImageJ version is greater than or equal to the specified version.
    `static boolean` | `checkJava()` Checks for a new enough version of the Java Runtime Environment.
    `static void` | `checkLibrary(LibraryChecker.Library library, java.util.HashSet<java.lang.String> missing)` Checks for a required library.
    `static void` | `checkLibrary(java.lang.String className, java.lang.String jarFile, java.util.HashSet<java.lang.String> missing)` Checks whether the given class is available; if not, adds the specified JAR file name to the hash set (presumably to report it missing to the user).
    `static boolean` | `checkMissing(java.util.HashSet<java.lang.String> missing)` Reports missing libraries in the given hash set to the user.

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

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

- - ### Field Detail

    - #### IMAGEJ_VERSION

          public static final java.lang.String IMAGEJ_VERSION

      Minimum version of ImageJ necessary for Bio-Formats plugins.
      See Also:
        Constant Field Values

    - #### IMAGEJ_MSG

          public static final java.lang.String IMAGEJ_MSG

      Message to be displayed if ImageJ is too old for Bio-Formats plugins.
      See Also:
        Constant Field Values

    - #### URL_BF_SOFTWARE

          public static final java.lang.String URL_BF_SOFTWARE

      URL for Bio-Formats web page.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LibraryChecker

          private LibraryChecker()

  - ### Method Detail

    - #### checkClass

          public static boolean checkClass(java.lang.String className)

      Checks whether the given class is available.

    - #### checkLibrary

          public static void checkLibrary(LibraryChecker.Library library,
                                          java.util.HashSet<java.lang.String> missing)

      Checks for a required library.

    - #### checkLibrary

          public static void checkLibrary(java.lang.String className,
                                          java.lang.String jarFile,
                                          java.util.HashSet<java.lang.String> missing)

      Checks whether the given class is available; if not, adds the specified JAR file name to the hash set (presumably to report it missing to the user).

    - #### checkJava

          public static boolean checkJava()

      Checks for a new enough version of the Java Runtime Environment.

    - #### checkImageJ

          public static boolean checkImageJ()

      Checks whether ImageJ is new enough for the Bio-Formats plugins.

    - #### checkImageJ

          public static boolean checkImageJ(java.lang.String target,
                                            java.lang.String msg)

      Returns true the current ImageJ version is greater than or equal to the specified version. Displays the given warning message if the current version is too old.

    - #### checkImageJ

          public static boolean checkImageJ(java.lang.String target,
                                            java.lang.String msg,
                                            java.lang.String title)

      Returns true the current ImageJ version is greater than or equal to the specified version. Displays the given warning message with the specified title if the current version is too old.

    - #### checkMissing

          public static boolean checkMissing(java.util.HashSet<java.lang.String> missing)

      Reports missing libraries in the given hash set to the user.
      Returns:
        true iff no libraries are missing (the hash set is empty).

Copyright © 2026 Open Microscopy Environment