Interface JdkProvider


public interface JdkProvider
Entry point for the JDK provider. Add a text file named META-INF/services/com.install4j.jdk.spi.JdkProvider to the JAR file containing the JDK provider and put the name of the implementation class in it. If the JAR file is added to the class path of install4j, the JDK provider will be picked up automatically. The class path of install4j can be changed by adding the line

 -classpath/a <path to JAR file>
 
to the bin/install4j.vmoptions file.
  • Method Details

    • getId

      @NotNull String getId()
      A unique ID for the provider.
    • getDisplayName

      @NotNull default String getDisplayName()
      The display name for the provider. By default, this is the same as the ID.
    • getReleases

      @NotNull Collection<? extends JdkNode> getReleases()
      Returns all releases. This is a tree of category and release nodes that is displayed to the user.
      See Also:
    • getByConfigKey

      @Nullable JdkReleaseNode getByConfigKey(@NotNull String configKey)
      Find a release from a release config key. The config key is returned by JdkReleaseNode.getConfigKey(). Null if not found.
    • getLatestByCategoryKey

      @Nullable JdkReleaseNode getLatestByCategoryKey(@NotNull String categoryKey, @NotNull String platform)
      Find the latest release from a category key that also has support for the given platform. The category key is returned by JdkCategoryNode.getCategoryKey(). Null if the category or no matching release could be found.
    • getPlatformsByCategoryKey

      @Nullable List<String> getPlatformsByCategoryKey(@NotNull String categoryKey)
      Get all platforms that are available from releases the category with the given category key. This is used for suggesting platforms for Linux/Unix media files. Null if the category could not be found.
    • removeArchivePrefix

      @NotNull default File removeArchivePrefix(@NotNull File relativeFile, @NotNull String release, @NotNull String platform)
      Remove a common prefix directory from the relative paths inside a JDK bundle. By default, nothing is removed.
    • detectDirectoryLayoutPrefix

      @NotNull default String detectDirectoryLayoutPrefix(@NotNull String platform, @NotNull String release, @NotNull File bundleFile)
      Returns the common prefix directory for the directory layout of the JDK. By default this handles the Contents/Home/ prefix for JDKs on macOS.