[109554] Jar the plugins (VE + JEM)
diff --git a/features/org.eclipse.jem-feature/feature.xml b/features/org.eclipse.jem-feature/feature.xml
index 337f32b..c36923b 100644
--- a/features/org.eclipse.jem-feature/feature.xml
+++ b/features/org.eclipse.jem-feature/feature.xml
@@ -42,7 +42,8 @@
          id="org.eclipse.jem"
          download-size="0"
          install-size="0"
-         version="0.0.0"/>
+         version="0.0.0"
+         unpack="false"/>
 
    <plugin
          id="org.eclipse.jem.workbench"
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java
index 8d00b68..2cab993 100644
--- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java
@@ -11,7 +11,7 @@
 package org.eclipse.jem.internal.proxy.core;
 /*
  *  $RCSfile: IConfigurationContributionController.java,v $
- *  $Revision: 1.10 $  $Date: 2005/10/26 14:24:51 $ 
+ *  $Revision: 1.11 $  $Date: 2005/10/26 18:48:19 $ 
  */
 
 import java.net.URL;
@@ -143,7 +143,12 @@
 	 * This is useful for nls where the nls for the filename will be in one or more of the fragments of the plugin.	 	 
 	 * 
 	 * @param bundle The bundle it can be found in.
-	 * @param relativePath Path to file/folder relative to bundle root. Or <code>null</code> if it is the bundle/fragment itself (for when the bundle has been jar'ed up). If it is <code>APPEND_JAVA_LIBRARY_PATH</code>, it should be folder and nlsLocalize will be ignored.
+	 * @param relativePath Path to file/folder relative to bundle root. Or <code>null</code> if it is the bundle/fragment itself (for when the bundle has been jar'ed up). 
+	 *   <b>Note: </b>If it is <code>APPEND_JAVA_LIBRARY_PATH</code>, it should be folder and nlsLocalize will be ignored.
+	 *   In this case be careful that if a folder and the plugin is jarred that the folder <b>IS NOT THE ROOT OF THE PLUGIN</b>. This will
+	 *   cause the entire plugin to be extracted instead of just the directory containing the libraries. If the libraries are in the root
+	 *   of a jarred plugin then a separate cache directory should be created instead and the libraries of interest extracted to there. And
+	 *   then point to the cache directory instead.
 	 * @param typeFlag One of <code>APPEND_USER_CLASSPATH</code>, <code>APPEND_BOOT_CLASSPATH</code>, <code>PREPEND_BOOT_CLASSPATH</code>, or <code>APPEND_JAVA_LIBRARY_PATH</code>.
 	 * @param nlsLocalize The usual value should be <code>false</code>. Use <code>true</code> if should look through fragments to gather them all as described in this methods description. This will work for jarred bundles/fragments too.
 	 * 
@@ -152,7 +157,7 @@
 	public void contributeClasspath(Bundle bundle, String relativePath, int typeFlag, boolean nlsLocalize);	
 	
 	/**
-	 * Same as contributeClasspath(Bundle, String, int, boolean) except an IPath can be used as the relative path.
+	 * Same as {@link #contributeClasspath(Bundle, String, int, boolean)} except an IPath can be used as the relative path.
 	 * 
 	 * @param bundle
 	 * @param relativePath path to file within bundle. Or <code>null</code> if it is the bundle/fragment itself (for when the bundle has been jar'ed up).
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java
index 8f1fd2b..318b957 100644
--- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java
@@ -11,7 +11,7 @@
 package org.eclipse.jem.internal.proxy.core;
 /*
  *  $RCSfile: ProxyPlugin.java,v $
- *  $Revision: 1.55 $  $Date: 2005/10/26 14:24:51 $ 
+ *  $Revision: 1.56 $  $Date: 2005/10/26 18:48:19 $ 
  */
 
 
@@ -178,7 +178,7 @@
 		return result;
 	}
 	
-	private static String getFileFromURL(URL url) {
+	public static String getFileFromURL(URL url) {
 		// We need to do this in a device independent way. The URL will always put a leading '/' in the
 		// file part of the URL, but on Windows we need to have this '/' removed. Some JRE's don't understand it.
 		return new File(url.getFile()).getAbsolutePath();
diff --git a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java
index 91587a3..5232611 100644
--- a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java
+++ b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: LocalFileConfigurationContributorController.java,v $
- *  $Revision: 1.12 $  $Date: 2005/10/26 14:24:51 $ 
+ *  $Revision: 1.13 $  $Date: 2005/10/26 18:48:19 $ 
  */
 package org.eclipse.jem.internal.proxy.remote;
 
@@ -215,12 +215,13 @@
 		if (nlsLocalize)
 			contributeClasspath(ProxyPlugin.getPlugin().urlLocalizeAllFromBundleAndFragments(bundle, relativePath), typeFlag);
 		else if (typeFlag == IConfigurationContributionController.APPEND_JAVA_LIBRARY_PATH) {
-			URL contribution = ProxyPlugin.getPlugin().urlLocalizeFromBundleAndFragments(bundle, relativePath);
-			if (contribution == null) {
+			if (relativePath == null || relativePath.length() == 0) {
 				// PDE is not here to help us extract that @#$ dll
-			    JEMUtilPlugin.getLogger().log("No free lunch!"); //$NON-NLS-1$
+			    JEMUtilPlugin.getLogger().log("Can't extract a directory from the root of a plugin."); //$NON-NLS-1$
+			    return;
 			}
-			contributeClasspath(contribution, typeFlag);
+			URL contribution = ProxyPlugin.getPlugin().urlLocalizeFromBundleAndFragments(bundle, relativePath);
+			contributeClasspath(contribution, typeFlag);			
 		} else {
 			if (relativePath != null)
 				contributeClasspath(ProxyPlugin.getPlugin().urlLocalizeFromBundleOnly(bundle, relativePath), typeFlag);
@@ -240,12 +241,12 @@
 			else
 				contributeClasspath(ProxyPlugin.getPlugin().urlLocalizeBundleAndFragments(bundle), typeFlag);
 		else if (typeFlag == IConfigurationContributionController.APPEND_JAVA_LIBRARY_PATH) {
-			contributeClasspath(ProxyPlugin.getPlugin().urlLocalizeFromBundleAndFragments(bundle, relativePath), typeFlag);
-			URL contribution = ProxyPlugin.getPlugin().urlLocalizeFromBundleAndFragments(bundle, relativePath);
-			if (contribution == null) {
+			if (relativePath == null || relativePath.segmentCount() == 0) {
 				// PDE is not here to help us extract that @#$ dll
-			    JEMUtilPlugin.getLogger().log("No free lunch!"); //$NON-NLS-1$
+			    JEMUtilPlugin.getLogger().log("Can't extract a directory from the root of a plugin."); //$NON-NLS-1$
+			    return;
 			}
+			URL contribution = ProxyPlugin.getPlugin().urlLocalizeFromBundleAndFragments(bundle, relativePath);
 			contributeClasspath(contribution, typeFlag);			
 		} else {
 			if (relativePath != null)
diff --git a/plugins/org.eclipse.jem/META-INF/MANIFEST.MF b/plugins/org.eclipse.jem/META-INF/MANIFEST.MF
index b52f6bf..6c86df0 100644
--- a/plugins/org.eclipse.jem/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jem/META-INF/MANIFEST.MF
@@ -3,8 +3,6 @@
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jem; singleton:=true
 Bundle-Version: 1.2.0
-Bundle-ClassPath: javainst.jar,
- mofjava.jar
 Bundle-Activator: org.eclipse.jem.internal.core.JEMPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jem/build.properties b/plugins/org.eclipse.jem/build.properties
index 3b05fa4..28d04ad 100644
--- a/plugins/org.eclipse.jem/build.properties
+++ b/plugins/org.eclipse.jem/build.properties
@@ -9,22 +9,21 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 src.excludes = **/.cvsignore
-source.mofjava.jar = mofjava/
 bin.includes = plugin.xml,\
                plugin.properties,\
-               javainst.jar,\
                about.html,\
                about.ini,\
                about.mappings,\
                about.properties,\
                eclipse32.gif,\
                overrides/,\
-               mofjava.jar,\
                .options,\
-               META-INF/
-jars.compile.order = mofjava.jar,\
-                     javainst.jar
-source.javainst.jar = javainst/
+               META-INF/,\
+               .
+jars.compile.order = .
 src.includes = about.html,\
                model/,\
                rose/
+output.. = bin/
+source.. = mofjava/,\
+           javainst/