Example usage for org.apache.commons.lang SystemUtils IS_OS_WINDOWS

List of usage examples for org.apache.commons.lang SystemUtils IS_OS_WINDOWS

Introduction

In this page you can find the example usage for org.apache.commons.lang SystemUtils IS_OS_WINDOWS.

Prototype

boolean IS_OS_WINDOWS

To view the source code for org.apache.commons.lang SystemUtils IS_OS_WINDOWS.

Click Source Link

Document

Is true if this is Windows.

The field will return false if OS_NAME is null.

Usage

From source file:com.vmware.identity.interop.ossam.BaseOsSamNativeStructure.java

protected BaseOsSamNativeStructure() {
    super(SystemUtils.IS_OS_WINDOWS ? W32APITypeMapper.UNICODE : LwApiTypeMapper.UNICODE);
}

From source file:de.erdesignerng.visual.Java3DUtils.java

public static void initializeLibraryPath() throws Exception {
    File theJava3DFile = new File("java3d");
    File theJava3DLibraryFile = null;
    if (SystemUtils.IS_OS_WINDOWS) {
        if (VM_32_BIT) {
            theJava3DLibraryFile = new File(theJava3DFile, "win32");
        } else {/*from  w  w  w . ja v a  2 s .c o m*/
            theJava3DLibraryFile = new File(theJava3DFile, "win64");
        }
    }
    if (SystemUtils.IS_OS_LINUX) {
        if (VM_32_BIT) {
            theJava3DLibraryFile = new File(theJava3DFile, "linux32");
        } else {
            theJava3DLibraryFile = new File(theJava3DFile, "linux64");
        }
    }
    if (SystemUtils.IS_OS_MAC) {
        theJava3DLibraryFile = new File(theJava3DFile, "macos-universal");
    }
    if (theJava3DLibraryFile != null) {
        addLibraryPath(theJava3DLibraryFile.getAbsolutePath());
    }
}

From source file:com.vmware.identity.interop.domainmanager.WinGuidNative.java

public WinGuidNative() {
    super(SystemUtils.IS_OS_WINDOWS ? W32APITypeMapper.UNICODE : null);
    data4 = new byte[WinDomainAdapter.WIN_GUID_DATA4_SIZE];
}

From source file:com.siemens.oss.omniproperties.builders.Os.java

@Override
public String build() throws IOException {
    if (SystemUtils.IS_OS_LINUX) {
        return "linux";
    } else if (SystemUtils.IS_OS_MAC) {
        return "mac";
    } else if (SystemUtils.IS_OS_WINDOWS) {
        return "windows";
    }//ww  w  . j  a  va 2s.co  m
    return "unknown";
}

From source file:de.rinderle.softvis3d.layout.dot.ExecuteCommandTest.java

@Test
public void testReadErrorStream() throws Exception {
    final String result;
    if (SystemUtils.IS_OS_WINDOWS) {
        result = "";//new ExecuteCommand().executeCommandReadErrorStream("dir");
    } else {/*from   ww  w.  ja  v a  2s .co  m*/
        result = new ExecuteCommand().executeCommandReadErrorStream("ls");
    }

    assertTrue(StringUtils.isEmpty(result));
}

From source file:com.nsn.squirrel.tab.utils.PathUtils.java

/**
 * Default path can be different for various OS
 * /*from  w w w . j av a 2  s.  co m*/
 * @return default path
 */
public static Path getDefaultPath() {

    Path defaultPath = Paths.get(""); //$NON-NLS-1$
    if (SystemUtils.IS_OS_WINDOWS) {
        defaultPath = Paths.get("C:\\"); //$NON-NLS-1$
    } else if (SystemUtils.IS_OS_MAC_OSX) {
        defaultPath = Paths.get(System.getenv().get("HOME")); //$NON-NLS-1$
    }
    return defaultPath;
}

From source file:com.vmware.identity.interop.domainmanager.WinDcInfoNative.java

public WinDcInfoNative() {
    super(SystemUtils.IS_OS_WINDOWS ? W32APITypeMapper.UNICODE : null);
}

From source file:com.vmware.identity.interop.idm.UserInfoNative.java

protected UserInfoNative() {
    super(SystemUtils.IS_OS_WINDOWS ? W32APITypeMapper.UNICODE : LwApiTypeMapper.UNICODE);
}

From source file:cane.brothers.e4.commander.utils.PathUtils.java

/**
 * Default path can be different for various OS
 * /*from w w  w.ja v  a 2s.  c o  m*/
 * @return default path
 */
public static Path getDefaultPath() {
    Path defaultPath = Paths.get(""); //$NON-NLS-1$

    if (SystemUtils.IS_OS_WINDOWS) {
        defaultPath = Paths.get("C:\\"); //$NON-NLS-1$
    } else if (SystemUtils.IS_OS_MAC_OSX) {
        defaultPath = Paths.get(System.getenv().get("HOME")); //$NON-NLS-1$
    }
    return defaultPath;
}

From source file:musite.MusiteMain.java

private static void setupLookAndFeel() {
    try {/*from w w w  .  ja v  a  2  s .  co  m*/
        if (SystemUtils.IS_OS_WINDOWS) {
            /*
             * For Windows: just use platform default look & feel.
             */
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        } else if (SystemUtils.IS_OS_MAC) {
            /*
             * For Mac: move menue bar to OS X default bar (next to Apple
             * icon)
             */
            System.setProperty("apple.laf.useScreenMenuBar", "true");
        } else {
            /*
             * For Unix platforms, use JGoodies Looks
             */
            UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
            Plastic3DLookAndFeel.set3DEnabled(true);
            Plastic3DLookAndFeel.setCurrentTheme(new com.jgoodies.looks.plastic.theme.SkyBluer());
            Plastic3DLookAndFeel.setTabStyle(Plastic3DLookAndFeel.TAB_STYLE_METAL_VALUE);
            Plastic3DLookAndFeel.setHighContrastFocusColorsEnabled(true);

            Options.setDefaultIconSize(new Dimension(18, 18));
            Options.setHiResGrayFilterEnabled(true);
            Options.setPopupDropShadowEnabled(true);
            Options.setUseSystemFonts(true);

            UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE);
            UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}