我的要求是在运行时将War文件部署到OSGI中。
为了实现这一点,我正在尝试以下代码:
BundleContext bundlecontext = FrameworkUtil.getBundle(this.getclass()).getBundleContext();
Bundle b = bundlecontext.installBundle("file:" + "./war/testwar.war");
b.start();
但是,通过使用以上代码,我无法实现这一目标。
由于我是OSGI的新手,所以对OSGi的了解很少。 因此,我需要对此有所帮助。