summaryrefslogtreecommitdiff
path: root/java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-18 11:43:07 -0700
committerTor Norbye <tnorbye@google.com>2014-09-18 11:43:28 -0700
commite782c57d74000722f9db4c9426317410520670c6 (patch)
tree6e5d3e8934107ffabb7661f8bfc0e1a08eb37faf /java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java
parentc3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff)
downloadidea-e782c57d74000722f9db4c9426317410520670c6.tar.gz
Snapshot idea/138.2210 from git://git.jetbrains.org/idea/community.git
Change-Id: I8f0204d7887ee78cf1fd8c09f936c5afff0edd2f
Diffstat (limited to 'java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java')
-rw-r--r--java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java b/java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java
index 6af48770e78d..4b20e2189202 100644
--- a/java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java
+++ b/java/execution/impl/src/com/intellij/execution/runners/ProcessProxyFactoryImpl.java
@@ -30,15 +30,16 @@ import java.io.File;
public class ProcessProxyFactoryImpl extends ProcessProxyFactory {
public ProcessProxy createCommandLineProxy(final JavaCommandLine javaCmdLine) throws ExecutionException {
ProcessProxyImpl proxy = null;
- if (ProcessProxyImpl.useLauncher()) {
+ final JavaParameters javaParameters = javaCmdLine.getJavaParameters();
+ String mainClass = javaParameters.getMainClass();
+ if (ProcessProxyImpl.useLauncher() && mainClass != null) {
try {
proxy = new ProcessProxyImpl();
- final JavaParameters javaParameters = javaCmdLine.getJavaParameters();
JavaSdkUtil.addRtJar(javaParameters.getClassPath());
final ParametersList vmParametersList = javaParameters.getVMParametersList();
vmParametersList.defineProperty(ProcessProxyImpl.PROPERTY_PORT_NUMBER, String.valueOf(proxy.getPortNumber()));
vmParametersList.defineProperty(ProcessProxyImpl.PROPERTY_BINPATH, PathManager.getBinPath());
- javaParameters.getProgramParametersList().prepend(javaParameters.getMainClass());
+ javaParameters.getProgramParametersList().prepend(mainClass);
javaParameters.setMainClass(ProcessProxyImpl.LAUNCH_MAIN_CLASS);
}
catch (ProcessProxyImpl.NoMoreSocketsException e) {