本文介绍了无法在Felix config.properties中将PAX-URL的汇编协议与自动启动的捆绑包一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用PAX-URL,这样我就可以即时打包未打包的包.

I'm trying to use PAX-URL so I can have non-packed bundles assembled on the fly.

如果我将pax-url-assembly-1.2.1.jar放入自动启动包中,然后键入

If I put pax-url-assembly-1.2.1.jar in the autostart bundles, and then type

一切正常.麻烦的是,我想使用> felix.auto.start.1 = assembly:path/to/my/folder

everything works. The trouble is, I want to give felix those folders in the config file using > felix.auto.start.1=assembly:path/to/my/folder

如果这样做,我会收到未知协议:程序集"异常.

If I do so, I get an "Unknown protocol: assembly" exception.

我尝试加载级别1的PAX-URL,并将所有其他捆绑包的默认开始级别设置为10.这无济于事.我认为是系统捆绑包"本身会在加载任何捆绑包之前读取配置,因此无法理解组装".

I've tried loading PAX-URL at level 1 and set the default start level of all other bundles to 10. Won't help. I think it's the "System Bundle" itself that reads the configuration before any bundle is loaded and therefore "assembly" is not understood.

我的猜测是,我需要告诉Felix在Felix本身启动时立即加载PAX-URL.

My guess is I need to tell Felix to load PAX-URL right when Felix itself starts.

有什么想法吗?我把事情都弄错了吗? :)

Any ideas? Did I get it all wrong? :)

谢谢!

推荐答案

尝试将PAX-URL放入Apache Felix的bundle文件夹中,并使用-Djava.protocol.handler.pkgs=org.ops4j.pax.url选项启动它.

Try putting PAX-URL into bundle folder in Apache Felix and launch it with -Djava.protocol.handler.pkgs=org.ops4j.pax.url options.

这里是描述Eclipse中Apache Felix开发的文章

Here is a post describing Apache Felix development in Eclipse

这篇关于无法在Felix config.properties中将PAX-URL的汇编协议与自动启动的捆绑包一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 17:37