Package com.logicaldoc.util
Class SystemUtil
- java.lang.Object
-
- com.logicaldoc.util.SystemUtil
-
public class SystemUtil extends Object
Utility methods tpo get informations from the system- Since:
- 7.7.2
- Author:
- Marco Meschieri - LogicalDOC
-
-
Field Summary
Fields Modifier and Type Field Description static String
SUN_JAVA_COMMAND
-
Constructor Summary
Constructors Constructor Description SystemUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getOS()
static boolean
isMac()
static boolean
isSolaris()
static boolean
isUnix()
static boolean
isWindows()
static void
main(String[] args)
static String
printEnvironment()
static String
printJavaEnvironment()
static String
printStackTrace()
static String
printSystemEnvironment()
static void
restartApplication(Runnable runBeforeRestart)
Restarts the current Java application
-
-
-
Field Detail
-
SUN_JAVA_COMMAND
public static final String SUN_JAVA_COMMAND
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(String[] args)
-
printEnvironment
public static String printEnvironment()
-
printStackTrace
public static String printStackTrace()
-
printSystemEnvironment
public static String printSystemEnvironment()
-
printJavaEnvironment
public static String printJavaEnvironment()
-
isWindows
public static boolean isWindows()
-
isMac
public static boolean isMac()
-
isUnix
public static boolean isUnix()
-
isSolaris
public static boolean isSolaris()
-
getOS
public static String getOS()
-
restartApplication
public static void restartApplication(Runnable runBeforeRestart) throws IOException
Restarts the current Java application- Parameters:
runBeforeRestart
- some custom code to be run before restarting- Throws:
IOException
- raised if the application cannot be restarted
-
-