Package org.tn5250j.tools.system
Class OperatingSystem
- java.lang.Object
-
- org.tn5250j.tools.system.OperatingSystem
-
public class OperatingSystem extends java.lang.ObjectOperating system detection routines.- Since:
- jEdit 4.0pre4
- Version:
- $Id$
- Author:
- Slava Pestov
-
-
Constructor Summary
Constructors Constructor Description OperatingSystem()
-
Method Summary
Modifier and Type Method Description static voiddisplayURL(java.lang.String url)From JavaWorld Tip 66 - http://www.javaworld.com/javaworld/javatips/jw-javatip66.html Display a file in the system browser.static intexecute(java.lang.String command)static java.awt.RectanglegetScreenBounds()static booleanhasJava14()Returns if Java 2 version 1.4 is in use.static booleanisMacOS()Returns if we're running MacOS X.static booleanisUnix()Returns if we're running Unix (this includes MacOS X).static booleanisWindows()Returns if we're running Windows 95/98/ME/NT/2000/XP.
-
-
-
Method Detail
-
getScreenBounds
public static final java.awt.Rectangle getScreenBounds()
-
isWindows
public static final boolean isWindows()
Returns if we're running Windows 95/98/ME/NT/2000/XP.- Returns:
- flag, true if windows is
-
isUnix
public static final boolean isUnix()
Returns if we're running Unix (this includes MacOS X).- Returns:
- flag, true is unix os
-
isMacOS
public static final boolean isMacOS()
Returns if we're running MacOS X.- Returns:
- true, if mac os
-
hasJava14
public static final boolean hasJava14()
Returns if Java 2 version 1.4 is in use.- Returns:
- true, if old java14 is used
-
displayURL
public static void displayURL(java.lang.String url)
From JavaWorld Tip 66 - http://www.javaworld.com/javaworld/javatips/jw-javatip66.html Display a file in the system browser. If you want to display a file, you must include the absolute path name.- Parameters:
url- the file's url (the url must start with either "http://", "https://","mailto:" or "file://").
-
execute
public static int execute(java.lang.String command)
-
-