diff options
-rw-r--r-- | org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java | 6 |
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 |