List of usage examples for org.apache.commons.exec OS isFamilyWin9x
public static boolean isFamilyWin9x()
From source file:org.bonitasoft.platform.setup.PlatformSetupTestUtils.java
public static CommandLine createCommandLine() { if (OS.isFamilyWindows() || OS.isFamilyWin9x()) { CommandLine oCmdLine = new CommandLine("cmd"); oCmdLine.addArgument("/c"); oCmdLine.addArgument("setup.bat"); return oCmdLine; } else {// w w w. ja v a2 s .c om CommandLine oCmdLine = new CommandLine("sh"); oCmdLine.addArgument("setup.sh"); return oCmdLine; } }
From source file:org.docwhat.iated.AppState.java
public String getEditor() { String editor;/*from w w w. jav a 2 s .c o m*/ editor = store.get(EDITOR, ""); if (null == editor || "".equals(editor)) { if (OS.isFamilyMac()) { editor = "/Applications/TextEdit.app"; } else if (OS.isFamilyUnix()) { editor = "gvim"; } else if (OS.isFamilyWindows() || OS.isFamilyWin9x()) { editor = "notepad.exe"; } else { editor = ""; } } return editor; }
From source file:org.docwhat.iated.ui.PreferencesDialog.java
public String getDefaultAppDirectory() { if (OS.isFamilyMac()) { return "/Applications"; } else if (OS.isFamilyWindows() || OS.isFamilyWin9x()) { //TODO There is probably a better directory. return "C:\\"; } else if (OS.isFamilyUnix()) { return "/usr/bin"; } else {/*from w ww .j a v a 2s. c om*/ return "."; } }
From source file:org.sourcepit.common.maven.testing.ExternalMavenTest.java
protected CommandLine newCmd(File binDir, String bat, String sh, String... arguments) { final CommandLine cmd; if (OS.isFamilyWindows() || OS.isFamilyWin9x()) { cmd = process.newCommandLine(new File(binDir, bat)); } else if (OS.isFamilyUnix() || OS.isFamilyMac()) { cmd = process.newCommandLine("sh", new File(binDir, sh).getAbsolutePath()); } else {// w w w. j a va 2 s . c o m throw new AssertionFailedError("Os family"); } cmd.addArguments(arguments); return cmd; }