Class YAACBootstrap

java.lang.Object
org.ka2ddo.yaac.bootstrap.YAACBootstrap

public class YAACBootstrap extends Object
This is the bootstrap program for the YAAC program. It accepts the command line arguments to pass to the real YAAC program after it figures out the host operating system. Only usable on standard JRE environments where the AWT and Swing packages are available.
Author:
Andrew Pavlin, KA2DDO
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Symbolic name for Microsoft Windows operating systems, associated with OSNAME key in properties table.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    findJSSCLibrary(String javaClassPath)
    Search for the JSSC library jar to put on the class path if it is not already there.
    static String
    findYAACBaseDir(Class<?> yaacBootstrapClass)
    Find the base directory for the YAAC installation for a given starting class.
    static File
    Get the base directory of the YAAC installation.
    static URL
    Get the URL pointing to where the located JSSC library is stored.
    static String
    Get the name of the host operating system.
    static void
    main(String[] args)
    Launch the YAAC program's bootstrap.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • WINDOWS

      public static final String WINDOWS
      Symbolic name for Microsoft Windows operating systems, associated with OSNAME key in properties table.
      See Also:
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Launch the YAAC program's bootstrap.
      Parameters:
      args - String array of command-line argument tokens
      Throws:
      Exception - if YAAC could not be invoked for any reason
    • findYAACBaseDir

      public static String findYAACBaseDir(Class<?> yaacBootstrapClass)
      Find the base directory for the YAAC installation for a given starting class.
      Parameters:
      yaacBootstrapClass - Class to locate on the classpath
      Returns:
      the classpath String for the running instance of YAAC
    • findJSSCLibrary

      public static void findJSSCLibrary(String javaClassPath)
      Search for the JSSC library jar to put on the class path if it is not already there.
      Parameters:
      javaClassPath - String of classpath before looking for JSSC
    • getBaseDir

      public static File getBaseDir()
      Get the base directory of the YAAC installation.
      Returns:
      File of the base directory, or null if the base directory hasn't been found yet
    • getJsscURL

      public static URL getJsscURL()
      Get the URL pointing to where the located JSSC library is stored.
      Returns:
      URL of JSSC JAR file
    • getOsName

      public static String getOsName()
      Get the name of the host operating system.
      Returns:
      String name of operating system, as optimized for known supported O/Ss