Package org.graalvm.home
Class HomeFinder
java.lang.Object
org.graalvm.home.HomeFinder
A utility class to find various paths of the running GraalVM, as well as the version.
Use
getInstance()
to get the singleton instance.- Since:
- 19.3
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
HomeFinder
public HomeFinder()- Since:
- 19.3
-
-
Method Details
-
getHomeFolder
- Returns:
- the GraalVM home folder if inside GraalVM or
null
otherwise. - Since:
- 19.3
-
getVersion
- Returns:
- the GraalVM version or
"snapshot"
if unknown. - Since:
- 19.3
-
getLanguageHomes
- Returns:
- a Map of language ids to their home path.
- Since:
- 19.3
-
getToolHomes
- Returns:
- a Map of tool ids to their home path.
- Since:
- 19.3
-
getInstance
- Returns:
- the HomeFinder instance by using a ServiceLoader.
- Throws:
IllegalStateException
- if no implementation could be found.- Since:
- 19.3
-