From: Mathieu Baudier Date: Wed, 18 Oct 2023 11:42:45 +0000 (+0200) Subject: Fix framework location for JShell X-Git-Tag: v2.3.20~3 X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=commitdiff_plain;h=59b93352f4a8725d103c1154a06b5e380cbc8738 Fix framework location for JShell --- diff --git a/org.argeo.cms.jshell/src/org/argeo/internal/cms/jshell/osgi/OsgiExecutionControlProvider.java b/org.argeo.cms.jshell/src/org/argeo/internal/cms/jshell/osgi/OsgiExecutionControlProvider.java index 4a8f1685f..66a0ed992 100644 --- a/org.argeo.cms.jshell/src/org/argeo/internal/cms/jshell/osgi/OsgiExecutionControlProvider.java +++ b/org.argeo.cms.jshell/src/org/argeo/internal/cms/jshell/osgi/OsgiExecutionControlProvider.java @@ -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);