From 2379bd527e5778ac60b58ceefdc0f07aebf6e236 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 26 Mar 2020 12:58:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=20=E5=90=8C=E6=AD=A5=E5=88=B0feat?= =?UTF-8?q?ure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/start/DesignerLauncher.java | 16 +++++++++++++++- .../src/main/java/com/fr/start/FineDesigner.java | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 designer-realize/src/main/java/com/fr/start/FineDesigner.java diff --git a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java index 38f28346aa..48cf9e4d06 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java @@ -3,6 +3,9 @@ package com.fr.start; import com.fr.process.FineProcess; import com.fr.process.engine.FineJavaProcessFactory; import com.fr.process.engine.core.FineProcessContext; +import com.fr.stable.StableUtils; + +import java.io.File; /** * @author hades @@ -11,6 +14,10 @@ import com.fr.process.engine.core.FineProcessContext; */ public class DesignerLauncher { + private static final String BIN = "bin"; + private static final String DOT ="."; + private static final String BIN_HOME = generateBinHome(); + private static final DesignerLauncher INSTANCE = new DesignerLauncher(); private String[] args; @@ -19,6 +26,11 @@ public class DesignerLauncher { } + private static String generateBinHome() { + return DOT.equals(StableUtils.getInstallHome()) ? + DOT : StableUtils.getInstallHome() + File.separator + BIN; + } + public static DesignerLauncher getInstance() { return INSTANCE; } @@ -26,12 +38,14 @@ public class DesignerLauncher { public void start(String[] args) { this.args = args; FineJavaProcessFactory.create(). - entry("com.fr.start.MainDesigner"). + entry(MainDesigner.class). javaRuntime(DesignerJavaRuntime.getInstance().getJavaExec()). classPath(DesignerJavaRuntime.getInstance().getClassPath()). inheritJvmSettings(). jvmSettings(DesignerJavaRuntime.getInstance().getJvmOptions()). arguments(args). + directory(BIN_HOME). + entryPackage(FineDesigner.class). startProcess(DesignerProcessType.INSTANCE); DesignerSuperListener.getInstance().start(); } diff --git a/designer-realize/src/main/java/com/fr/start/FineDesigner.java b/designer-realize/src/main/java/com/fr/start/FineDesigner.java new file mode 100644 index 0000000000..a3e202308b --- /dev/null +++ b/designer-realize/src/main/java/com/fr/start/FineDesigner.java @@ -0,0 +1,14 @@ +package com.fr.start; + +import com.fr.process.engine.core.FineProcessEntry; + +/** + * 包装类 改变子进程的进程名 + * + * @author hades + * @version 10.0 + * Created by hades on 2020/3/24 + */ +public class FineDesigner extends FineProcessEntry { + +}