All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.bulletproof.util.Vm
public Vm()
public static boolean copyArray(Object srcArray,
int srcStart,
Object dstArray,
int dstStart,
int length)
public static boolean isColor()
public static int getTimeStamp()
public static String getPlatform()
public static String getUserName()
public static int getVersion()
public static int exec(String command,
String args,
int launchCode,
boolean wait)
As an example, the following call could be used to run the command "scandir /p mydir" under Java, Win32 or WinCE:
int result = Vm.exec("scandir", "/p mydir", 0, true);
This example executes the Scribble program under PalmOS:
Vm.exec("Scribble", null, 0, false);
This example executes the web clipper program under PalmOS, telling
it to display a web page by using launchCode 54 (CmdGoToURL).
Vm.exec("Clipper", "http://www.yahoo.com", 54, true);
The args parameter passed to this method is the arguments string
to pass to the program being executed.
The launchCode parameter is only used under PalmOS. Under PalmOS, it is the launch code value to use when the Vm calls SysUIAppSwitch(). If 0 is passed, the default launch code (CmdNormalLaunch) is used to execute the program.
The wait parameter passed to this method determines whether to execute the command asynchronously. If false, then the method will return without waiting for the command to complete execution. If true, the method will wait for the program to finish executing and the return value of the method will be the value returned from the application under Java, Win32 and WinCE.
Under PalmOS, the wait parameter is ignored since executing another program terminates the running program.
public static int setDeviceAutoOff(int seconds)
public static void sleep(int millis)
All Packages Class Hierarchy This Package Previous Next Index