PAX-URL: “Protocol not supported” at Felix's startup

馋奶兔 提交于 2019-12-10 19:55:02

问题


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.

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.

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.

What am I doing wrong? Is it possible to tell Felix to load pax-url at boot time already?

Thanks!


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!


回答1:


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



来源:https://stackoverflow.com/questions/5127969/pax-url-protocol-not-supported-at-felixs-startup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!