utils
Class SystemUtils

java.lang.Object
  extended by utils.SystemUtils

public class SystemUtils
extends java.lang.Object

DocJava, Inc. http://www.docjava.com Programmer: dlyon Date: Mar 29, 2004 Time: 3:33:32 PM


Constructor Summary
SystemUtils()
           
 
Method Summary
static void appendJavaExtensionsDirectory(java.lang.String p)
           
static java.lang.String free()
           
static java.lang.String getBootPath()
           
static java.lang.String getClassPath()
           
static java.lang.String getDirectorySeparator()
           
static java.io.File getJarPath()
           
static java.io.File getJarSignerPath()
          This works on windows, linux and the mac.
static java.io.File getJavaCommand()
           
static java.lang.String getJavaExtensionsDirectory()
           
static java.lang.String getJavaHome()
           
static java.lang.Object[] getNullArray()
           
static java.lang.String getPathSeparator()
           
static java.lang.String getProps()
           
static java.io.File getRmicPath()
          This works on windows, linux and the mac.
static java.lang.String getSdkHome()
           
static java.lang.String getSysInfo()
           
static java.lang.String getTmpDir()
           
static java.lang.String getUid()
           
static java.lang.String getUserDir()
           
static java.lang.String getUserHome()
          Returns the users home directory.
static void home()
           
static boolean isJava2()
           
static void main(java.lang.String[] args)
           
static void printMethodNames(PrintStub printStub, java.lang.reflect.Method[] ma)
           
static void printMethods(PrintStub printStub, java.lang.reflect.Method[] methods)
           
static void printProp(java.lang.String p)
           
static void printProps()
           
static void printProps(PrintStub printStubFrame1)
           
static void props()
           
static void runGc()
           
static java.lang.String[] runMain(java.lang.Class classToRun)
          This method runs the main in a class, c, in a different JVM.
static void testClassPathBug()
           
static void testGetPath()
           
static void testJarSigner()
           
static void testJavaCommand()
           
static void testPrintProps()
           
static void testRunMain()
           
static void userDir()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemUtils

public SystemUtils()
Method Detail

main

public static void main(java.lang.String[] args)

getUid

public static java.lang.String getUid()

testJavaCommand

public static void testJavaCommand()

testJarSigner

public static void testJarSigner()

getTmpDir

public static java.lang.String getTmpDir()

getJavaExtensionsDirectory

public static java.lang.String getJavaExtensionsDirectory()

getBootPath

public static java.lang.String getBootPath()

appendJavaExtensionsDirectory

public static void appendJavaExtensionsDirectory(java.lang.String p)

getRmicPath

public static java.io.File getRmicPath()
This works on windows, linux and the mac. It has not been tested on all platforms!

Returns:
location of the rmic compiler.

testGetPath

public static void testGetPath()

getJarPath

public static java.io.File getJarPath()

getJarSignerPath

public static java.io.File getJarSignerPath()
This works on windows, linux and the mac. It has not been tested on all platforms!


getJavaCommand

public static java.io.File getJavaCommand()
Returns:
the location of the java command.

getSdkHome

public static java.lang.String getSdkHome()

getJavaHome

public static java.lang.String getJavaHome()

getUserDir

public static java.lang.String getUserDir()
Returns:
the location of the program that is running. Typically something like:
/User/lyon/current/j4p.

getDirectorySeparator

public static java.lang.String getDirectorySeparator()
Returns:
the character(s) used to delimit directories in path names. For example:
/home/lyon/foo, the file separator is "/".

getPathSeparator

public static java.lang.String getPathSeparator()
Returns:
return the character use to delimit the paths in a list of paths.

printProps

public static void printProps()

getProps

public static java.lang.String getProps()

testPrintProps

public static void testPrintProps()

free

public static java.lang.String free()
Returns:
a string that describes the JVM's free RAM

runGc

public static void runGc()

props

public static void props()

printProp

public static void printProp(java.lang.String p)

getClassPath

public static java.lang.String getClassPath()

home

public static void home()

userDir

public static void userDir()

getUserHome

public static java.lang.String getUserHome()
Returns the users home directory. For example: C:\Documents and Settings\dlyon


getSysInfo

public static java.lang.String getSysInfo()

testRunMain

public static void testRunMain()
                        throws java.io.IOException
Throws:
java.io.IOException

isJava2

public static boolean isJava2()
Returns:
true if the present version of Java is java2.

runMain

public static java.lang.String[] runMain(java.lang.Class classToRun)
                                  throws java.io.IOException
This method runs the main in a class, c, in a different JVM. It uses the classpath of the current run-time environments

Throws:
java.io.IOException

getNullArray

public static java.lang.Object[] getNullArray()

testClassPathBug

public static void testClassPathBug()

printProps

public static void printProps(PrintStub printStubFrame1)

printMethods

public static void printMethods(PrintStub printStub,
                                java.lang.reflect.Method[] methods)

printMethodNames

public static void printMethodNames(PrintStub printStub,
                                    java.lang.reflect.Method[] ma)