Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0F3017EDF for ; Mon, 1 Jun 2015 22:19:28 +0000 (UTC) Received: (qmail 70950 invoked by uid 500); 1 Jun 2015 22:19:28 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 70919 invoked by uid 500); 1 Jun 2015 22:19:28 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 70910 invoked by uid 99); 1 Jun 2015 22:19:28 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 22:19:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 18945C0B58 for ; Mon, 1 Jun 2015 22:19:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id RruQHLjooQe3 for ; Mon, 1 Jun 2015 22:19:27 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 1CCB447C34 for ; Mon, 1 Jun 2015 22:19:16 +0000 (UTC) Received: (qmail 70202 invoked by uid 99); 1 Jun 2015 22:19:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 22:19:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F3621E0850; Mon, 1 Jun 2015 22:19:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 01 Jun 2015 22:19:44 -0000 Message-Id: <8fe9aec3a3cc4d58a70905855e6e0c7c@git.apache.org> In-Reply-To: <2331b7ed2ccf46ad99699422a6f7ad50@git.apache.org> References: <2331b7ed2ccf46ad99699422a6f7ad50@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [32/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-389 Commit: 5df06682c517731b3811ca4d0daabaa504b732f3 Parents: 8455c7a Author: ivasilinets Authored: Fri May 29 16:57:30 2015 +0300 Committer: ivasilinets 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 procParams = params == null || params.isEmpty() ? Collections.emptyList() : Arrays.asList(params.split(" ")); List 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);