Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Schiebel2016-02-09 05:44:53 +0000
committerSarika Sinha2016-02-09 05:44:53 +0000
commitc4e62d86fa3ec59253fda4854c489060344c62b1 (patch)
treeb4d0e17927438c5c2ad7d7a6fc24f0982d5a75a0
parent0f8d506af0cb7d21f0313f73e86799a6a46a2b54 (diff)
downloadeclipse.jdt.debug-c4e62d86fa3ec59253fda4854c489060344c62b1.tar.gz
eclipse.jdt.debug-c4e62d86fa3ec59253fda4854c489060344c62b1.tar.xz
eclipse.jdt.debug-c4e62d86fa3ec59253fda4854c489060344c62b1.zip
Bug 484026 - If no perfect match is available for an EEI20160209-0800
Change-Id: I112f2b5168c1a7b55695465e05b68758fa092141 Signed-off-by: Jens Schiebel <jens.schiebel@gmx.net>
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java
index f7ff8f04f..659085034 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ package org.eclipse.jdt.internal.launching;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.Arrays;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -190,7 +191,8 @@ public class JREContainerInitializer extends ClasspathContainerInitializer {
}
}
//try the default VM install: https://bugs.eclipse.org/bugs/show_bug.cgi?id=371300
- if(vm == null && installs.length > 0) {
+ // if default vm is a match https://bugs.eclipse.org/bugs/show_bug.cgi?id=484026
+ if (vm == null && installs.length > 0 && Arrays.asList(installs).contains(JavaRuntime.getDefaultVMInstall())) {
vm = JavaRuntime.getDefaultVMInstall();
}
// use the first VM failing that

Back to the top