Class TrackerStarter
java.lang.Object
org.opensourcephysics.cabrillo.tracker.deploy.TrackerStarter
A class to start Tracker. This is the main executable when Tracker is
deployed.
- Author:
- Douglas Brown
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
copyXuggleJarsTo
(String targetDir, String xuggleDir) Copies Xuggle jar files to a target directory.static String[]
Finds the bundled Java VMs.static XMLControl
Finds and loads the preferences file into an XMLControl.static String
findTrackerHome
(boolean writeToLog) Finds the Tracker home directory and sets/returns the static variable trackerHome.static String
findXuggleHome
(String trackerHome, boolean writeToLog) Finds the Xuggle home directory and sets/returns the static variable xuggleHome.static String[]
getXuggleJarNames
(String jarpath) Gets the xuggle jar names for a specified jarpath.static File
Returns the Xuggle server jar (version 5.7+), if anystatic void
launchTracker
(String[] args) Launches a new instance of Tracker.static void
logMessage
(String message) static void
Main entry point when used as executablestatic void
Relaunches a new instance of Tracker.static boolean
usesXuggleServer
(String jarpath)
-
Field Details
-
PREFERRED_TRACKER_JAR
- See Also:
-
PREFERRED_MEMORY_SIZE
- See Also:
-
TRACKER_RELAUNCH
- See Also:
-
TRACKER_NEW_VERSION
- See Also:
-
LOG_FILE_NAME
- See Also:
-
LOG_DIAGNOSTICS_NAME
- See Also:
-
DEFAULT_MEMORY_SIZE
public static final int DEFAULT_MEMORY_SIZE- See Also:
-
MINIMUM_MEMORY_SIZE
public static final int MINIMUM_MEMORY_SIZE- See Also:
-
PREFS_FILE_NAME
- See Also:
-
INDEX_XUGGLE_57
public static final int INDEX_XUGGLE_57- See Also:
-
INDEX_XUGGLE_34
public static final int INDEX_XUGGLE_34- See Also:
-
xuggleVersionIndex
public static int xuggleVersionIndex -
XUGGLE_JAR_NAMES
-
xuggleFileFilter
-
-
Constructor Details
-
TrackerStarter
public TrackerStarter()
-
-
Method Details
-
main
Main entry point when used as executable- Parameters:
args
- array of filenames
-
launchTracker
Launches a new instance of Tracker.- Parameters:
args
- array of filenames. The first arg may be a preferred tracker.jar.
-
relaunch
Relaunches a new instance of Tracker.- Parameters:
args
- array of filenamessecondTry
- true to flag this as a second try in the new process
-
findTrackerHome
Finds the Tracker home directory and sets/returns the static variable trackerHome.- Parameters:
writeToLog
- true to write the results to the start log
-
findPreferences
Finds and loads the preferences file into an XMLControl.- Returns:
- the loaded XMLControl, or null if no preferences file found
-
findXuggleHome
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
Returns the Xuggle server jar (version 5.7+), if any- Returns:
- the xuggle server jar
-
findBundledVMs
Finds the bundled Java VMs. Always returns array but some strings may be null. -
getXuggleJarNames
Gets the xuggle jar names for a specified jarpath.- Returns:
- an array of jar names
-
copyXuggleJarsTo
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 directoryxuggleDir
- the Xuggle directory containing source jar files- Returns:
- true if jars are copied
-
usesXuggleServer
-
logMessage
-