|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.getdown.util.LaunchUtil
public class LaunchUtil
Useful routines for launching Java applications from within other Java applications.
| Field Summary | |
|---|---|
static String |
LOCAL_JAVA_DIR
The directory into which a local VM installation should be unpacked. |
| Constructor Summary | |
|---|---|
LaunchUtil()
|
|
| Method Summary | |
|---|---|
static String |
getJVMPath(File appdir)
Reconstructs the path to the JVM used to launch this process. |
static String |
getJVMPath(File appdir,
boolean windebug)
Reconstructs the path to the JVM used to launch this process. |
static boolean |
mustMonitorChildren()
Returns true if, on this operating system, we have to stick around and read the stderr from our children processes to prevent them from filling their output buffers and hanging. |
static boolean |
updateVersionAndRelaunch(File appdir,
String getdownJarName,
String newVersion)
Writes a version.txt file into the specified application directory and
attempts to relaunch Getdown in that directory which will cause it to upgrade to the newly
specified version and relaunch the application. |
static void |
upgradeGetdown(File oldgd,
File curgd,
File newgd)
Upgrades Getdown by moving an installation managed copy of the Getdown jar file over the non-managed copy (which would be used to run Getdown itself). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOCAL_JAVA_DIR
| Constructor Detail |
|---|
public LaunchUtil()
| Method Detail |
|---|
public static boolean updateVersionAndRelaunch(File appdir,
String getdownJarName,
String newVersion)
throws IOException
version.txt file into the specified application directory and
attempts to relaunch Getdown in that directory which will cause it to upgrade to the newly
specified version and relaunch the application.
appdir - the directory in which the application is installed.getdownJarName - the name of the getdown jar file in the application directory. This is
probably getdown-pro.jar or getdown-retro-pro.jar if you are using
the results of the standard build.newVersion - the new version to which Getdown will update when it is executed.
IOException - thrown if we were unable to create the version.txt file
in the supplied application directory. If the version.txt file cannot be created, restarting
Getdown will not cause the application to be upgraded, so the application will have to
resort to telling the user that it is in a bad way.public static String getJVMPath(File appdir)
public static String getJVMPath(File appdir,
boolean windebug)
windebug - if true we will use java.exe instead of javaw.exe on Windows.
public static void upgradeGetdown(File oldgd,
File curgd,
File newgd)
If the upgrade fails for a variety of reasons, warnings are logged but no other actions are taken. There's not much else one can do other than try again next time around.
public static boolean mustMonitorChildren()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||