Top Description Constructors Methods
org.graalvm.home

public abstract Class HomeFinder

Additional top-level class in compilation unit: HomeFinderFeature.

extends Object
Class Inheritance
Known Direct Subclasses
org.graalvm.home.impl.DefaultHomeFinder
Imports
java.nio.file.Path, java.util.Iterator, .Map, .NoSuchElementException, .ServiceLoader, org.graalvm.home.impl.DefaultHomeFinder, org.graalvm.nativeimage.ImageInfo, .ImageSingletons, org.graalvm.nativeimage.hosted.Feature

A utility class to find various paths of the running GraalVM, as well as the version. Use HomeFinder#getInstance() to get the singleton instance.
Since
19.3

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Path

Returns:

the GraalVM home folder if inside GraalVM or null otherwise.
getHomeFolder
()

public static HomeFinder

Returns:

the HomeFinder instance by using a ServiceLoader.
getInstance
()

public abstract Map<String, Path>

Returns:

a Map of language ids to their home path.
getLanguageHomes
()

public abstract Map<String, Path>

Returns:

a Map of tool ids to their home path.
getToolHomes
()

public abstract String

Returns:

the GraalVM version or "snapshot" if unknown.
getVersion
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HomeFinderback to summary
public HomeFinder()
Since
19.3

Method Detail

getHomeFolderback to summary
public abstract Path getHomeFolder()
Returns:Path

the GraalVM home folder if inside GraalVM or null otherwise.

Since
19.3
getInstanceback to summary
public static HomeFinder getInstance()
Returns:HomeFinder

the HomeFinder instance by using a ServiceLoader.

Exceptions
IllegalStateException:
if no implementation could be found.
Since
19.3
getLanguageHomesback to summary
public abstract Map<String, Path> getLanguageHomes()
Returns:Map<String, Path>

a Map of language ids to their home path.

Since
19.3
getToolHomesback to summary
public abstract Map<String, Path> getToolHomes()
Returns:Map<String, Path>

a Map of tool ids to their home path.

Since
19.3
getVersionback to summary
public abstract String getVersion()
Returns:String

the GraalVM version or "snapshot" if unknown.

Since
19.3