You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/02 21:55:29 UTC
[31/50] [abbrv] incubator-ignite git commit: #gg-10369: Fix exception
when we start ignite and gridgain nodes.
#gg-10369: Fix exception when we start ignite and gridgain nodes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5df06682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5df06682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5df06682
Branch: refs/heads/ignite-948
Commit: 5df06682c517731b3811ca4d0daabaa504b732f3
Parents: 8455c7a
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri May 29 16:57:30 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri May 29 16:57:30 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridJavaProcess.java | 30 ++++++++++++--------
1 file changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5df06682/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
index bff26ec..42fe089 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java
@@ -128,25 +128,31 @@ public final class GridJavaProcess {
gjProc.log = log;
gjProc.procKilledC = procKilledC;
- String javaBin = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
- String classpath = System.getProperty("java.class.path");
- String sfcp = System.getProperty("surefire.test.class.path");
-
- if (sfcp != null)
- classpath += System.getProperty("path.separator") + sfcp;
-
- if (cp != null)
- classpath += System.getProperty("path.separator") + cp;
-
List<String> procParams = params == null || params.isEmpty() ?
Collections.<String>emptyList() : Arrays.asList(params.split(" "));
List<String> procCommands = new ArrayList<>();
+ String javaBin = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
+
procCommands.add(javaBin);
procCommands.addAll(jvmArgs == null ? U.jvmArgs() : jvmArgs);
- procCommands.add("-cp");
- procCommands.add(classpath);
+
+ if (!jvmArgs.contains("-cp") && !jvmArgs.contains("-classpath")) {
+ String classpath = System.getProperty("java.class.path");
+
+ String sfcp = System.getProperty("surefire.test.class.path");
+
+ if (sfcp != null)
+ classpath += System.getProperty("path.separator") + sfcp;
+
+ if (cp != null)
+ classpath += System.getProperty("path.separator") + cp;
+
+ procCommands.add("-cp");
+ procCommands.add(classpath);
+ }
+
procCommands.add(clsName);
procCommands.addAll(procParams);