fixed #75201: MacOSXVMInstallType.detectInstallLocation() always returns null if findVMInstall succeeds
diff --git a/org.eclipse.jdt.launching.macosx/.classpath b/org.eclipse.jdt.launching.macosx/.classpath
index 64ec817..230dc67 100644
--- a/org.eclipse.jdt.launching.macosx/.classpath
+++ b/org.eclipse.jdt.launching.macosx/.classpath
@@ -1,15 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="macosx"/>
-	<classpathentry kind="src" path="/org.eclipse.jdt.debug"/>
-	<classpathentry kind="src" path="/org.eclipse.debug.core"/>
-	<classpathentry kind="src" path="/org.eclipse.core.resources"/>
-	<classpathentry kind="src" path="/org.eclipse.jdt.core"/>
-	<classpathentry kind="src" path="/org.eclipse.jdt.launching"/>
-	<classpathentry kind="src" path="/org.eclipse.core.runtime.compatibility"/>
-	<classpathentry kind="src" path="/org.eclipse.jdt.ui"/>
-	<classpathentry kind="src" path="/org.eclipse.jface"/>
-	<classpathentry kind="src" path="/org.eclipse.ui"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java b/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java
index dbe4899..1fdbfc4 100644
--- a/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java
+++ b/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java
@@ -22,6 +22,7 @@
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 
+import org.eclipse.jdt.internal.launching.LaunchingPlugin;
 import org.eclipse.jdt.internal.launching.LibraryInfo;
 import org.eclipse.jdt.internal.launching.StandardVMType;
 
@@ -97,30 +98,39 @@
 			File[] versions= versionDir.listFiles();
 			for (int i= 0; i < versions.length; i++) {
 				String version= versions[i].getName();
-				File home=  new File(versions[i], JVM_ROOT);
-				if (home.exists() && findVMInstall(version) == null && !CURRENT_JVM.equals(version)) {
-					
+				File home= new File(versions[i], JVM_ROOT);
+				if (home.exists()) {
 					boolean isDefault= currentJDK.equals(versions[i]);
-					
-					VMStandin vm= new VMStandin(this, version);
-					vm.setInstallLocation(home);
-					String format= MacOSXLaunchingPlugin.getString(isDefault
-												? "MacOSXVMType.jvmDefaultName"		//$NON-NLS-1$
-												: "MacOSXVMType.jvmName");				//$NON-NLS-1$
-					vm.setName(MessageFormat.format(format, new Object[] { version } ));
-					vm.setLibraryLocations(getDefaultLibraryLocations(home));
-					URL doc= getDefaultJavadocLocation(home);
-					if (doc != null)
-						vm.setJavadocLocation(doc);
-					
-					IVMInstall rvm= vm.convertToRealVM();
-					
-					if (isDefault) {
-						defaultLocation= home;
-						try {
-							JavaRuntime.setDefaultVMInstall(rvm, null);
-						} catch (CoreException e) {
-							// NeedWork
+					IVMInstall install= findVMInstall(version);
+					if (install == null && !CURRENT_JVM.equals(version)) {
+						VMStandin vm= new VMStandin(this, version);
+						vm.setInstallLocation(home);
+						String format= MacOSXLaunchingPlugin.getString(isDefault
+													? "MacOSXVMType.jvmDefaultName"		//$NON-NLS-1$
+													: "MacOSXVMType.jvmName");				//$NON-NLS-1$
+						vm.setName(MessageFormat.format(format, new Object[] { version } ));
+						vm.setLibraryLocations(getDefaultLibraryLocations(home));
+						URL doc= getDefaultJavadocLocation(home);
+						if (doc != null)
+							vm.setJavadocLocation(doc);
+						
+						IVMInstall rvm= vm.convertToRealVM();					
+						if (isDefault) {
+							defaultLocation= home;
+							try {
+								JavaRuntime.setDefaultVMInstall(rvm, null);
+							} catch (CoreException e) {
+								LaunchingPlugin.log(e);
+							}
+						}
+					} else {
+						if (isDefault) {
+							defaultLocation= home;
+							try {
+								JavaRuntime.setDefaultVMInstall(install, null);
+							} catch (CoreException e) {
+								LaunchingPlugin.log(e);
+							}
 						}
 					}
 				}