com.cafesoft.core.util
Class SystemUtils

java.lang.Object
  |
  +--com.cafesoft.core.util.SystemUtils

public class SystemUtils
extends Object

SystemUtils contains various useful system-level utilities for launching and managing processes.

Since:
5/30/03

Field Summary
static boolean debug
          Debug flag that determines if debugging is enabled for the SystemUtils class.
static boolean IS_JAVA_1_1
          Determine if the java version is 1.1.X
static boolean IS_JAVA_1_2
          Determine if the java version is 1.2.X
static boolean IS_JAVA_1_3
          Determine if the java version is 1.3.X
static boolean IS_JAVA_1_4
          Determine if the java version is 1.4.X
static boolean IS_JAVA_1_5
          Determine if the java version is 1.5.X
static String JAVA_VERSION
          The value of the System property java.version
 
Constructor Summary
SystemUtils()
           
 
Method Summary
static void beep()
          Sound a system-specific beep.
static void execProcess(String[] args)
          Execute a Process (return once the process is launched).
static void execProcessAndMonitor(String[] args)
          Execute an monitor a Process.
static Integer execProcessAndWait(String[] args)
          Execute a Process and wait until it completes.
static String getSystemProperties()
          Get the System properties
static void launchWindowsBrowser(String url)
          Launch a browser or file viewer on Windows.
static void launchWindowsHelp(String helpFile)
          Launch Windows Help.
static boolean setDebug(boolean enable)
          Enable/disable debugging of SystemUtils.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Debug flag that determines if debugging is enabled for the SystemUtils class.


JAVA_VERSION

public static final String JAVA_VERSION
The value of the System property java.version


IS_JAVA_1_1

public static final boolean IS_JAVA_1_1
Determine if the java version is 1.1.X


IS_JAVA_1_2

public static final boolean IS_JAVA_1_2
Determine if the java version is 1.2.X


IS_JAVA_1_3

public static final boolean IS_JAVA_1_3
Determine if the java version is 1.3.X


IS_JAVA_1_4

public static final boolean IS_JAVA_1_4
Determine if the java version is 1.4.X


IS_JAVA_1_5

public static final boolean IS_JAVA_1_5
Determine if the java version is 1.5.X

Constructor Detail

SystemUtils

public SystemUtils()
Method Detail

getSystemProperties

public static String getSystemProperties()
Get the System properties

Returns:
a formatted String containing all system properties.

setDebug

public static boolean setDebug(boolean enable)
Enable/disable debugging of SystemUtils.


execProcess

public static void execProcess(String[] args)
Execute a Process (return once the process is launched).

Parameters:
args - the arguments (parameters) for the process.

execProcessAndWait

public static Integer execProcessAndWait(String[] args)
Execute a Process and wait until it completes. NOTE: System.out and System.err are captured from the process and displayed to the calling processes System.err.

Parameters:
args - the arguments (parameters) for the process.

execProcessAndMonitor

public static void execProcessAndMonitor(String[] args)
Execute an monitor a Process. NOTE: System.out and System.err are captured from the process and displayed to the calling processes System.err.

Parameters:
args - the arguments (parameters) for the process.

launchWindowsHelp

public static void launchWindowsHelp(String helpFile)
Launch Windows Help.

Parameters:
helpFile - the path to the Windows help file.

launchWindowsBrowser

public static void launchWindowsBrowser(String url)
Launch a browser or file viewer on Windows.

Parameters:
url - the URL or file path to be viewed.

beep

public static void beep()
Sound a system-specific beep.



Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.