Package com.install4j.jdk.spi
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 Summary
Modifier and TypeMethodDescriptiondefault String
detectDirectoryLayoutPrefix
(String platform, String release, File bundleFile) Returns the common prefix directory for the directory layout of the JDK.getByConfigKey
(String configKey) Find a release from a release config key.default String
The display name for the provider.getId()
A unique ID for the provider.getLatestByCategoryKey
(String categoryKey, String platform) Find the latest release from a category key that also has support for the given platform.getPlatformsByCategoryKey
(String categoryKey) Get all platforms that are available from releases the category with the given category key.Collection<? extends JdkNode>
Returns all releases.default File
removeArchivePrefix
(File relativeFile, String release, String platform) Remove a common prefix directory from the relative paths inside a JDK bundle.
-
Method Details
-
getId
A unique ID for the provider. -
getDisplayName
The display name for the provider. By default, this is the same as the ID. -
getReleases
Returns all releases. This is a tree of category and release nodes that is displayed to the user.- See Also:
-
getByConfigKey
Find a release from a release config key. The config key is returned byJdkReleaseNode.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 byJdkCategoryNode.getCategoryKey()
. Null if the category or no matching release could be found. -
getPlatformsByCategoryKey
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 theContents/Home/
prefix for JDKs on macOS.
-