Deal with initial@reference
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 26 Jul 2009 19:38:56 +0000 (19:38 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 26 Jul 2009 19:38:56 +0000 (19:38 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@2771 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/lib/detached/DetachedLauncher.java

index 825a9717d91efec1fbb1cb1b0a2996775a1abd2d..6f06d24d2c48781c7e37e6ee846f146593a29d3a 100644 (file)
@@ -68,6 +68,7 @@ public class DetachedLauncher extends JvmProcess implements BundleContextAware,
                        else if (xercesBundleName.equals(name) && prependXmlJars)
                                getPBootClasspath().add(asResource(bundle.getLocation()));
 
+                       location = removeInitialReference(location);
                        if (location.startsWith("file:")) {
                                File file = new File(location.substring("file:".length()));
                                if (osgiLocations.length() != 0)
@@ -89,12 +90,17 @@ public class DetachedLauncher extends JvmProcess implements BundleContextAware,
 
        protected Resource findOsgiboot(Bundle bundle) {
                String location = bundle.getLocation();
+               location = removeInitialReference(location);
+               return asResource(location);
+       }
+       
+       protected String removeInitialReference(String location){
                if (location.startsWith("initial@reference:file:"))
                        location = System.getProperty("osgi.install.area")
                                        + location.substring("initial@reference:file:".length());
                if (location.charAt(location.length() - 1) == '/')
                        location.substring(0, location.length() - 1);
-               return asResource(location);
+               return location;
        }
 
        protected Resource asResource(String location) {