Class HomeFinder

java.lang.Object
org.graalvm.home.HomeFinder

public abstract class HomeFinder extends Object
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 Details

    • HomeFinder

      public HomeFinder()
      Since:
      19.3
  • Method Details

    • getHomeFolder

      public abstract Path getHomeFolder()
      Returns:
      the GraalVM home folder if inside GraalVM or null otherwise.
      Since:
      19.3
    • getVersion

      public abstract String getVersion()
      Returns:
      the GraalVM version or "snapshot" if unknown.
      Since:
      19.3
    • getLanguageHomes

      public abstract Map<String,Path> getLanguageHomes()
      Returns:
      a Map of language ids to their home path.
      Since:
      19.3
    • getToolHomes

      public abstract Map<String,Path> getToolHomes()
      Returns:
      a Map of tool ids to their home path.
      Since:
      19.3
    • getInstance

      public static HomeFinder getInstance()
      Returns:
      the HomeFinder instance by using a ServiceLoader.
      Throws:
      IllegalStateException - if no implementation could be found.
      Since:
      19.3