Bug 433455: StandardVMType.generateLibraryInfo() failed to detect libraries Oracle JRockit VM [Luna]
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
index b4e447b..dcd7641 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
@@ -70,6 +70,15 @@
 	public static final String ID_STANDARD_VM_TYPE = "org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"; //$NON-NLS-1$
 	
 	/**
+	 * The minimal -Xmx size for launching a JVM. <br>
+	 * <b>Note:</b> Must be omitted for Standard11xVM! <br>
+	 * <b>Note:</b> Must be at least -Xmx16m for JRockit, see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=433455">bug 433455</a>.
+	 * 
+	 * @since 3.7.100
+	 */
+	public static final String MIN_VM_SIZE = "-Xmx16m"; //$NON-NLS-1$
+
+	/**
 	 * Name filter for files ending in .jar or .zip
 	 * 
 	 * @since 3.7.0
@@ -596,8 +605,8 @@
 		File file = LaunchingPlugin.getFileInPlugin(new Path("lib/launchingsupport.jar")); //$NON-NLS-1$
 		if (file != null && file.exists()) {
 			String javaExecutablePath = javaExecutable.getAbsolutePath();
-			String[] cmdLine = new String[] { javaExecutablePath,
-					"-Xmx4m", "-classpath", file.getAbsolutePath(), "org.eclipse.jdt.internal.launching.support.LibraryDetector" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			String[] cmdLine = new String[] { javaExecutablePath, MIN_VM_SIZE,
+					"-classpath", file.getAbsolutePath(), "org.eclipse.jdt.internal.launching.support.LibraryDetector" }; //$NON-NLS-1$ //$NON-NLS-2$ 
 			Process p = null;
 			try {
 				String envp[] = null;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
index e4d4720..4a4a746 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
@@ -38,6 +38,7 @@
 import org.eclipse.jdt.internal.launching.LaunchingMessages;
 import org.eclipse.jdt.internal.launching.LaunchingPlugin;
 import org.eclipse.jdt.internal.launching.Standard11xVM;
+import org.eclipse.jdt.internal.launching.StandardVMType;
 import org.eclipse.osgi.util.NLS;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -366,7 +367,7 @@
 					abort(NLS.bind(LaunchingMessages.AbstractVMInstall_0, ""), null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
 				}
 				if (!(this instanceof Standard11xVM)) {
-					config.setVMArguments(new String[] { "-Xmx4m" }); //$NON-NLS-1$
+					config.setVMArguments(new String[] { StandardVMType.MIN_VM_SIZE });
 				}
 				config.setProgramArguments(properties);
 				Launch launch = new Launch(null, ILaunchManager.RUN_MODE, null);