added support for Info.plist tag "JVMVersion"
diff --git a/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLaunchingPlugin.java b/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLaunchingPlugin.java
index 7bb45eb..3f9ebe8 100644
--- a/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLaunchingPlugin.java
+++ b/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLaunchingPlugin.java
@@ -4,4 +4,4 @@
 	/**
	 * Constructor for MacOSXLaunchingPlugin
	 */
	public MacOSXLaunchingPlugin(IPluginDescriptor descriptor) {
 		super(descriptor);
 		fgPlugin= this;
	}
-	
	public static MacOSXLaunchingPlugin getDefault() {
		return fgPlugin;
	}
	
	/**
	 * Convenience method which returns the unique identifier of this plugin.
	 */
	public static String getUniqueIdentifier() {
		if (getDefault() == null) {
			// If the default instance is not yet initialized,
			// return a static identifier. This identifier must
			// match the plugin id defined in plugin.xml
			return "org.eclipse.jdt.launching.macosx"; //$NON-NLS-1$
		}
		return getDefault().getDescriptor().getUniqueIdentifier();
	}
	
	static String createWrapper(Class where, String filename) {

		/*
		 * In order to build an application bundle under MacOS X we need a small stub
		 * that reads the various artefacts of a bundle and starts the Java VM. We copy
		 * the stub either from the running Eclipse or from the JavaVM
		 * framework. Here we create the appropriate pathname.
		 */
		String javaApplStub= System.getProperty("sun.boot.library.path");	//$NON-NLS-1$
		int pos= javaApplStub.indexOf(':');
		if (pos > 0)
			javaApplStub= javaApplStub.substring(0, pos);	
		String expected= "/Contents/Resources/Java";	//$NON-NLS-1$
		if (javaApplStub.endsWith(expected)) {
			javaApplStub= javaApplStub.substring(0, javaApplStub.length()-expected.length());
			javaApplStub+= "/Contents/MacOS/Eclipse";	//$NON-NLS-1$
		} else {
			javaApplStub= "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub"; //$NON-NLS-1$
		}
		javaApplStub= "JAVASTUB=\""+ javaApplStub + "\"\n";	//$NON-NLS-1$ //$NON-NLS-2$
		
	
		String output= "/tmp/start_carbon.sh";	//$NON-NLS-1$
		FileOutputStream os= null;
		try {
			os= new FileOutputStream(output);
		} catch (FileNotFoundException ex) {
			return null;
		}
						
		InputStream is= null;
		try {
			os.write("#!/bin/sh\n".getBytes());	//$NON-NLS-1$
			os.write(javaApplStub.getBytes());

			is= where.getResourceAsStream(filename);
			if (is != null) {
				while (true) {
					int c= is.read();
					if (c == -1)
						break;
					os.write(c);
				}
			}
			os.flush();
		} catch (IOException io) {
			return null;
		} finally {
			if (is != null) {
				try {
					is.close();
				} catch (IOException e) {
				}
			}
			try {
				os.close();
			} catch(IOException e) {
			}
		}
		
		return output;
	}
}
+	
	public static MacOSXLaunchingPlugin getDefault() {
		return fgPlugin;
	}
	
	/**
	 * Convenience method which returns the unique identifier of this plugin.
	 */
	public static String getUniqueIdentifier() {
		if (getDefault() == null) {
			// If the default instance is not yet initialized,
			// return a static identifier. This identifier must
			// match the plugin id defined in plugin.xml
			return "org.eclipse.jdt.launching.macosx"; //$NON-NLS-1$
		}
		return getDefault().getDescriptor().getUniqueIdentifier();
	}
	
	static String createWrapper(Class where, String filename) {

		/*
		 * In order to build an application bundle under MacOS X we need a small stub
		 * that reads the various artefacts of a bundle and starts the Java VM. We copy
		 * the stub either from the running Eclipse or from the JavaVM
		 * framework. Here we create the appropriate pathname.
		 */
		String javaApplStub= System.getProperty("sun.boot.library.path");	//$NON-NLS-1$
		int pos= javaApplStub.indexOf(':');
		if (pos > 0)
			javaApplStub= javaApplStub.substring(0, pos);	
		String expected= "/Contents/Resources/Java";	//$NON-NLS-1$
		if (javaApplStub.endsWith(expected)) {
			javaApplStub= javaApplStub.substring(0, javaApplStub.length()-expected.length());
			javaApplStub+= "/Contents/MacOS/";	//$NON-NLS-1$
		} else {
			javaApplStub= "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/"; //$NON-NLS-1$
		}
		javaApplStub= "JAVASTUB=\""+ javaApplStub + "\"\n";	//$NON-NLS-1$ //$NON-NLS-2$
		
	
		String output= "/tmp/start_carbon.sh";	//$NON-NLS-1$
		FileOutputStream os= null;
		try {
			os= new FileOutputStream(output);
		} catch (FileNotFoundException ex) {
			return null;
		}
						
		InputStream is= null;
		try {
			os.write("#!/bin/sh\n".getBytes());	//$NON-NLS-1$
			os.write(javaApplStub.getBytes());

			is= where.getResourceAsStream(filename);
			if (is != null) {
				while (true) {
					int c= is.read();
					if (c == -1)
						break;
					os.write(c);
				}
			}
			os.flush();
		} catch (IOException io) {
			return null;
		} finally {
			if (is != null) {
				try {
					is.close();
				} catch (IOException e) {
				}
			}
			try {
				os.close();
			} catch(IOException e) {
			}
		}
		
		return output;
	}
}
diff --git a/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/start_carbon.sh b/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/start_carbon.sh
index 516e800..c7ad47e 100644
--- a/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/start_carbon.sh
+++ b/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/start_carbon.sh
@@ -50,6 +50,13 @@
 #	echo "$JDI not found" > /dev/console
 #fi
 
+# extract JVM version from 1st argument
+JVM_VERSION="1.3.1"
+if test "$1" = "/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Home/bin/java"
+then
+	JVM_VERSION="1.4.1"
+fi
+
 # skip 1st argument
 shift
 
@@ -102,7 +109,7 @@
 #
 # Copy the JavaAppLauncher into the bundle 
 #
-cp "$JAVASTUB" "MacOS/$APP_NAME"
+cp "$JAVASTUB"/* "MacOS/$APP_NAME"
 
 #
 # Create the Info.plist file.
@@ -130,6 +137,8 @@
 		<string>1.0.1</string>
 	<key>Java</key>
 	<dict>
+	    <key>JVMVersion</key>
+			<string>$JVM_VERSION</string>
 		<key>VMOptions</key>
 			<array>$VM_OPTIONS</array>
 		<key>ClassPath</key>