问题描述
我正在使用PAX-URL从Eclipse启动基于Felix的项目.我使用组装协议来避免预先打包我的捆绑包.
I'm using PAX-URL to launch a Felix based project from Eclipse. I use the assembly protocol to avoid having to pre-pack my bundles.
在项目中,使用felix.jar和包含felix.auto.start.1 = assembly:foo/bar/classes的config.properties启动felix,以启动我的一个未打包的捆绑包.
In the project, felix is started using the felix.jar and a config.properties which includes felix.auto.start.1=assembly:foo/bar/classes to start one of my unpacked bundles.
麻烦的是,直到 读取完配置文件后,felix才知道pax-url协议,所以我收到未知协议:程序集"错误.
The trouble is, felix doesn't know about the pax-url protocols until after it's finished reading that config file, so I get an "Unknown Protocol: assembly" error.
我做错了什么?可以告诉Felix已经在启动时加载pax-url了吗?
What am I doing wrong? Is it possible to tell Felix to load pax-url at boot time already?
谢谢!
.询问的方式为您提供了一种寻找解决方案的不同方法,因此,我不会将此问题标记为重复.感谢比约恩的提示!
The same problem is solved by this question. The way it's asked gives you a different way to look for the solution, so I'm going to not mark this question as a duplicate. Thanks Bjorn for the tip!
推荐答案
您可以作弊,将pax url添加到bootclasspath(取决于您实际启动felix的方式),并将以下系统属性添加到启动vm:-Djava.protocol.handler.pkgs = org.ops4j.pax.url
You can cheat, adding pax url to the bootclasspath (depends on how you actually launch felix) and add the following system property to the starting vm:-Djava.protocol.handler.pkgs=org.ops4j.pax.url
这篇关于PAX-URL:“不支持协议"在Felix的创业公司的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!