OSGI equinox 运行环境搭建

OSGI equinox 运行环境搭建
关键字: osgi equinox 运行环境搭建
config.ini文件中bundles=后面的值,多值的情况下不要放换行和空格之类的字符。

如果启动的时候有错误会在configuration目录下产生一个.log文件,可以参考修正配置。

典型的config.ini配置
Java代码
eclipse.ignoreApp=true 
osgi.bundles=org.eclipse.equinox.common.jar@4:start,org.eclipse.osgi.services.jar@4:start,javax.servlet.jar@4:start,org.eclipse.equinox.cm.jar@4:start,org.eclipse.equinox.util.jar@4:start,org.eclipse.equinox.ds.jar@4:start,org.apache.commons.logging.jar@4:start,org.eclipse.equinox.log.jar@4:start  
eof=eof 

eclipse.ignoreApp=true
osgi.bundles=org.eclipse.equinox.common.jar@4:start,org.eclipse.osgi.services.jar@4:start,javax.servlet.jar@4:start,org.eclipse.equinox.cm.jar@4:start,org.eclipse.equinox.util.jar@4:start,org.eclipse.equinox.ds.jar@4:start,org.apache.commons.logging.jar@4:start,org.eclipse.equinox.log.jar@4:start
eof=eof 
典型的run.bat内容
Java代码
java -jar plugins/org.eclipse.osgi.jar -configuration configuration -console 

java -jar plugins/org.eclipse.osgi.jar -configuration configuration -console 
典型的equinox的运行环境的目录结构是
Java代码
:.  
│  run.bat  
│    
├─configuration  
│     config.ini    
└─plugins  
        javax.servlet.jar  
        org.apache.commons.logging.jar  
        org.eclipse.equinox.cm.jar  
        org.eclipse.equinox.common.jar  
        org.eclipse.equinox.ds.jar  
        org.eclipse.equinox.log.jar  
        org.eclipse.equinox.util.jar  
        org.eclipse.osgi.jar  
        org.eclipse.osgi.services.jar 

:.
│  run.bat
│ 
├─configuration
│     config.ini 
└─plugins
        javax.servlet.jar
        org.apache.commons.logging.jar
        org.eclipse.equinox.cm.jar
        org.eclipse.equinox.common.jar
        org.eclipse.equinox.ds.jar
        org.eclipse.equinox.log.jar
        org.eclipse.equinox.util.jar
        org.eclipse.osgi.jar
        org.eclipse.osgi.services.jar 
运行run.bat后的界面和输入ss命令查看插件的启动情况如下图

运行install命令
Java代码
osgi> install file:plugins/net.triones.ex.client.api.jar 

你可能感兴趣的:(java,apache,eclipse,servlet,osgi)