Siv*_*lam 23 java osgi eclipse-plugin
命令:
\eclipse-SDK-4.2RC3-win32-x86_64_001\eclipse\plugins>java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -console
Run Code Online (Sandbox Code Playgroud)
异常(来自日志文件)
!SESSION 2012-06-22 23:36:27.649 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -console
!ENTRY org.eclipse.osgi 4 0 2012-06-22 23:36:28.632
!MESSAGE Could not find bundle: org.eclipse.equinox.console
!STACK 0
org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console
at org.eclipse.osgi.framework.internal.core.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:211)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:297)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:151)
!ENTRY org.eclipse.osgi 4 0 2012-06-22 23:36:28.663
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:151)
Run Code Online (Sandbox Code Playgroud)
但是以下的罐子是可用的.
org.eclipse.equinox.console_1.0.0.v20120522-1841.jar
Run Code Online (Sandbox Code Playgroud)
有关上述错误的任何建议?
Nei*_*ett 25
您需要安装几个软件包才能使用控制台,如果您刚刚使用Equinox启动,java -jar ...
则无法获得这些软件包.
最快捷的方法是创建一个名为configuration/config.ini
以下内容的文件:
osgi.bundles=file\:org.eclipse.equinox.console_1.0.0.v20111215-1210.jar@start,file:\org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@start,file:\org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@start
Run Code Online (Sandbox Code Playgroud)
注意,您必须根据实际情况查看这些捆绑包的版本号.我尝试使用SDK-4.2M6,其中一些可能在RC3中发生了变化.
Com*_*ome 16
在新版本的equinox中,内置的OSGi shell已被替换为felix gogo shell.如果你想使用新的shell,你必须放置gogo jar,并在配置文件中定义它们.
但是,如果您喜欢OSGi Equinox shell,您只需将以下行添加到您的config.ini
文件中即可使用它:osgi.console.enable.builtin=true
.在这种情况下,无需添加额外的罐子或任何配置.
这是因为Eclipse的默认shell已被移动到"Apache Felix Gogo"; 因此必须在运行之前将必要的包添加到"运行配置"中.以下是您需要从列表中选择的四个捆绑:
org.apache.felix.gogo.command_0.10.0v<version>.jar
org.apache.felix.gogo.runtime_0.10.0v<version>.jar
org.apache.felix.gogo.shell_0.10.0v<version>.jar
org.eclipse.equinox.console_1.0.100<version>.jar
Run Code Online (Sandbox Code Playgroud)
如上图所示添加这些后,程序运行顺畅.
参考:http://www.digizol.com/2013/11/Eclipse-org-osgi-framework-BundleException-equinox-console.html
我遇到了同样的问题,我试图osgi.console.enable.builtin=true
在config.ini文件中添加,但似乎每次运行项目时都会重新创建文件,我解决问题的方式运行配置 - >参数选项卡添加-Dosgi.console.enable.builtin=true
VM参数
归档时间: |
|
查看次数: |
41402 次 |
最近记录: |