Class OperatingSystem


  • public class OperatingSystem
    extends java.lang.Object
    Operating 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 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.
      static int execute​(java.lang.String command)  
      static java.awt.Rectangle getScreenBounds()  
      static boolean hasJava14()
      Returns if Java 2 version 1.4 is in use.
      static boolean isMacOS()
      Returns if we're running MacOS X.
      static boolean isUnix()
      Returns if we're running Unix (this includes MacOS X).
      static boolean isWindows()
      Returns if we're running Windows 95/98/ME/NT/2000/XP.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OperatingSystem

        public OperatingSystem()
    • 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)