From 83ffaf32185b3616730b9b63add489a100e7a860 Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 7 Nov 2017 10:23:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D8.0=20mac=E4=B8=8Bdemo=E6=97=A0=E6=B3=95=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/Demo.java | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/designer_base/src/com/fr/start/Demo.java b/designer_base/src/com/fr/start/Demo.java index 042a621b31..523c87b795 100644 --- a/designer_base/src/com/fr/start/Demo.java +++ b/designer_base/src/com/fr/start/Demo.java @@ -8,42 +8,42 @@ import com.fr.stable.StableUtils; import java.io.IOException; public class Demo { - public static void main(String[] args) { - String installHome = StableUtils.getInstallHome(); - if (installHome == null) { - FRContext.getLogger().error("Can not find the install home, please check it."); - return; - } + public static void main(String[] args) { + String installHome = StableUtils.getInstallHome(); + if (installHome == null) { + FRContext.getLogger().error("Can not find the install home, please check it."); + return; + } String executorPath; if (OperatingSystem.isMacOS()) { - executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app --args demo"); + executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app"); } else { executorPath = StableUtils.pathJoin(installHome, "bin", "designer.exe demo"); } - if (!new java.io.File(executorPath).exists()) { - FRContext.getLogger().error(executorPath + " can not be found."); - } + if (!new java.io.File(executorPath).exists()) { + FRContext.getLogger().error(executorPath + " can not be found."); + } if (OperatingSystem.isMacOS()) { - ProcessBuilder builder = new ProcessBuilder(); - builder.command("open -a", executorPath); + ProcessBuilder builder = new ProcessBuilder(); + builder.command("open", "-a", executorPath, "--args", "demo"); try { builder.start(); } catch (IOException e) { FRContext.getLogger().error(e.getMessage(), e); } } else { - // ProcessBuilder这种方式在window下报错:系统找不到指定文件 - Runtime rt = Runtime.getRuntime(); - try { - rt.exec(executorPath); - } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); - } + // ProcessBuilder这种方式在window下报错:系统找不到指定文件 + Runtime rt = Runtime.getRuntime(); + try { + rt.exec(executorPath); + } catch (IOException e) { + FRContext.getLogger().error(e.getMessage(), e); + } } - System.exit(0); - } + System.exit(0); + } } \ No newline at end of file