Class JavaRuntimes

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Map<String,List<JavaRuntimeRelease>>>

public class JavaRuntimes extends HashMap<String,Map<String,List<JavaRuntimeRelease>>>
See Also:
  • Constructor Details

  • Method Details

    • fromJson

      public static JavaRuntimes fromJson(String json) throws dev.treset.mcdl.json.SerializationException
      Throws:
      dev.treset.mcdl.json.SerializationException
    • get

      public static JavaRuntimes get() throws dev.treset.mcdl.exception.FileDownloadException
      Gets a map of all available java runtimes
      Returns:
      A map of java runtimes. Structure: {os_identifier: {version_id: [release]}}
      Throws:
      dev.treset.mcdl.exception.FileDownloadException - If there is an error downloading or parsing the runtimes
    • getOsReleases

      public Map<String,List<JavaRuntimeRelease>> getOsReleases(String os)
      Gets a map of all available java runtimes for a specified os
      Parameters:
      os - The os identifier
      Returns:
      A map of java runtimes for the specified os. Structure: {version_id: [release]}
    • getReleases

      public List<JavaRuntimeRelease> getReleases(String os, String version)
      Gets a list of all available java runtimes for a specified os and version
      Parameters:
      os - The os identifier
      version - The version identifier
      Returns:
      A list of java runtimes for the specified os and version