]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/lib/detached/DetachedLauncher.java
Deal with initial@reference
[gpl/argeo-slc.git] / 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) {