Bug 561077 - set install area to user.dir if not loaded from file URL

Change-Id: I89aaf5894cf0b8546333f2b7dc1159733cd6cc2d
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
index 2cb16eb..1781fc0 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
@@ -957,8 +957,15 @@
 				setConfiguration(PROP_FRAMEWORK, externalForm);
 			}
 			if (getConfiguration(EquinoxLocations.PROP_INSTALL_AREA) == null) {
-				String filePart = getFrameworkPath(url.getPath(), true);
-				setConfiguration(EquinoxLocations.PROP_INSTALL_AREA, filePart);
+				String installArea;
+				if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
+					installArea = getFrameworkPath(url.getPath(), true);
+				} else {
+					// likely not a full eclipse install, and probably not loaded out of a typical
+					// URL class loader. Just default to the user dir.
+					installArea = System.getProperty("user.dir"); //$NON-NLS-1$
+				}
+				setConfiguration(EquinoxLocations.PROP_INSTALL_AREA, installArea);
 			}
 		}
 		// always decode these properties