java配置文件中的plugin,java – Eclipse Equinox,如何配置自动加载plugin文件夹中的bundle...

最简单的方法是使用

Apache Felix File Install.它适用于Equinox,您只需将文件安装配置参数放入configuration / config.ini即可.请注意,如果通过启动程序JAR或通过二进制文件启动Equinox,则工作目录将是configuration /或plugins /目录的父目录.

摘自我们的项目config.ini:

# Start File Install itself

osgi.bundles=reference\:file\:org.apache.felix.fileinstall_3.1.0.jar@1\:start

# The name of the directory to watch

felix.fileinstall.dir=./plugins

# A regular expression to be used to filter file names

# We have all bundles in plugins/ directory, this regexp

# forbids monitoring bundles that are started via osgi.bundles property

felix.fileinstall.filter=^(?!org.apache.felix.fileinstall|org.eclipse.osgi).*

# Determines if File Install waits felix.fileinstall.poll milliseconds before doing an initial scan or not.

felix.fileinstall.noInitialDelay=true

# Not sure why we have this...

felix.fileinstall.start.level=2

其他可能的解决方案是使用Eclipse P2.它更加先进和强大,但我发现它很难使用.

好的一点是,如果您的应用程序与捆绑包的配置方式无关(并且应该是这样),您可以随时改变主意.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值