geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r395241 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/internal/GeronimoServerRuntimeWizardFragment.java
Date Wed, 19 Apr 2006 13:34:51 GMT
Author: sppatel
Date: Wed Apr 19 06:34:27 2006
New Revision: 395241

URL: http://svn.apache.org/viewcvs?rev=395241&view=rev
Log:
GERONIMODEVTOOLS-78

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/internal/GeronimoServerRuntimeWizardFragment.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/internal/GeronimoServerRuntimeWizardFragment.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/internal/GeronimoServerRuntimeWizardFragment.java?rev=395241&r1=395240&r2=395241&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/internal/GeronimoServerRuntimeWizardFragment.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.ui/src/org/apache/geronimo/st/v1/ui/internal/GeronimoServerRuntimeWizardFragment.java
Wed Apr 19 06:34:27 2006
@@ -28,6 +28,8 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstall2;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -303,8 +305,13 @@
 	}
 
 	private boolean isValidVM() {
-		String vmId = getRuntimeDelegate().getVMInstallId();
-		return vmId != null && vmId.startsWith("1.4");
+		String javaVersion = null;
+		IVMInstall vmInstall = getRuntimeDelegate().getVMInstall();
+		if (vmInstall instanceof IVMInstall2) 
+			javaVersion = ((IVMInstall2) vmInstall).getJavaVersion();
+		return javaVersion != null && javaVersion.startsWith("1.4");
+		//This returns false on MacOSX due to do no IVMInstall2.getJavaVersion() implementation
+		//on Mac, fixed in Eclipse 3.2
 	}
 
 	private void validateDecorators() {



Mime
View raw message