我根据this创建OSGI包教程,但是当我尝试使用以下命令安装 bundle 时:
osgi> install file:/<path>/sample01-1.0.0.jar
它将显示此错误:
Hello World...!
osgi> install file:/sample01-0.0.1-SNAPSHOT.jar<br>
gogo: BundleException: An error occurred trying to read the bundle<br>
osgi> "
有什么问题吗?这是我的第一个 OSGI 包。
最佳答案
对于 Windows:
osgi> install file:///d://dir1//dir2//file.jar
对于 Linux:
您必须首先检查 jar 文件是否设置了适当的访问权限。
osgi> install file:///home//user//osgi//plugin.jar
关于java - 戈戈 : BundleException: An error occurred trying to read the bundle in OSGi with Equinox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24482138/