Package 

Class UpdateHandler

  • All Implemented Interfaces:

    
    public class UpdateHandler
    
                        

    Handler for easy updating of the jar file from a GitHub repo.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static String getNewestVersion(String ghRepo) Get the newest release version of an GitHub repo.
      static void installUpdate(String ghRepo, String assetName, Class<out Object> mainClass) Replace the .jar from your main class with a new one from GitHub.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getNewestVersion

         static String getNewestVersion(String ghRepo)

        Get the newest release version of an GitHub repo.

        Parameters:
        ghRepo - The repo path.
      • installUpdate

         static void installUpdate(String ghRepo, String assetName, Class<out Object> mainClass)

        Replace the .jar from your main class with a new one from GitHub.

        Parameters:
        ghRepo - The repo path.
        assetName - The asset name which should be downloaded from GitHub.
        mainClass - The main class of your application to get the correct path to the .jar file.