Class TrackerStarter

java.lang.Object
org.opensourcephysics.cabrillo.tracker.deploy.TrackerStarter

public class TrackerStarter extends Object
A class to start Tracker. This is the main executable when Tracker is deployed.
Author:
Douglas Brown
  • Field Details

  • Constructor Details

    • TrackerStarter

      public TrackerStarter()
  • Method Details

    • main

      public static void main(String[] args)
      Main entry point when used as executable
      Parameters:
      args - array of filenames
    • launchTracker

      public static void launchTracker(String[] args)
      Launches a new instance of Tracker.
      Parameters:
      args - array of filenames. The first arg may be a preferred tracker.jar.
    • relaunch

      public static void relaunch(String[] args, boolean secondTry)
      Relaunches a new instance of Tracker.
      Parameters:
      args - array of filenames
      secondTry - true to flag this as a second try in the new process
    • findTrackerHome

      public static String findTrackerHome(boolean writeToLog)
      Finds the Tracker home directory and sets/returns the static variable trackerHome.
      Parameters:
      writeToLog - true to write the results to the start log
    • findPreferences

      public static XMLControl findPreferences()
      Finds and loads the preferences file into an XMLControl.
      Returns:
      the loaded XMLControl, or null if no preferences file found
    • findXuggleHome

      public static String findXuggleHome(String trackerHome, boolean writeToLog) throws Exception
      Finds the Xuggle home directory and sets/returns the static variable xuggleHome.
      Parameters:
      trackerHome - the Tracker home directory (may be null)
      writeToLog - true to write results to the start log
      Throws:
      Exception
    • getXuggleServerJar

      public static File getXuggleServerJar()
      Returns the Xuggle server jar (version 5.7+), if any
      Returns:
      the xuggle server jar
    • findBundledVMs

      public static String[] findBundledVMs()
      Finds the bundled Java VMs. Always returns array but some strings may be null.
    • getXuggleJarNames

      public static String[] getXuggleJarNames(String jarpath)
      Gets the xuggle jar names for a specified jarpath.
      Returns:
      an array of jar names
    • copyXuggleJarsTo

      public static boolean copyXuggleJarsTo(String targetDir, String xuggleDir)
      Copies Xuggle jar files to a target directory. Does nothing and returns true if the target files exist and are the same size.
      Parameters:
      targetDir - the directory
      xuggleDir - the Xuggle directory containing source jar files
      Returns:
      true if jars are copied
    • usesXuggleServer

      public static boolean usesXuggleServer(String jarpath)
    • logMessage

      public static void logMessage(String message)