Fix framework location for JShell
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 18 Oct 2023 11:42:45 +0000 (13:42 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 18 Oct 2023 11:42:45 +0000 (13:42 +0200)
org.argeo.cms.jshell/src/org/argeo/internal/cms/jshell/osgi/OsgiExecutionControlProvider.java

index 4a8f1685f769b0d622373cff420362902dbea124..66a0ed992eee0c4f26967dc1a241d40c57cbb8e8 100644 (file)
@@ -179,9 +179,9 @@ public class OsgiExecutionControlProvider implements ExecutionControlProvider {
        }
 
        public static String getBundleClasspath(Long bundleId) throws IOException {
-               String framework = System.getProperty("osgi.framework");
-               Path frameworkLocation = Paths.get(URI.create(framework)).toAbsolutePath();
                BundleContext bc = FrameworkUtil.getBundle(OsgiExecutionControlProvider.class).getBundleContext();
+               String framework = bc.getProperty("osgi.framework");
+               Path frameworkLocation = Paths.get(URI.create(framework)).toAbsolutePath();
                Bundle fromBundle = bc.getBundle(bundleId);
 
                BundleWiring fromBundleWiring = fromBundle.adapt(BundleWiring.class);