在命令行中执行无头的日食 [英] Executing headless eclipse in command line
问题描述
在中找到feature.xml
按照网站上的说明,我可以生成jar文件。复制org.eclipse.equinox.launcher.jar后,我尝试执行jar文件
java -jar org.eclipse .equinox.launcher_1.2.0.v20110502.jar -application headlessHello_1.0.0.201210101430.jar
我试过
java -cp::org.eclipse.equinox.launcher_1.2.0.v20110502.jar org.eclipse.core.launcher。主要应用程序headlessHello_1.0.0.201210101430.jar
以获取错误消息
发生错误。查看日志文件
/Users/users/Desktop/configuration/1349897444823.log
此日志文件
!会议3月10日星期三14:30:44 CDT 2012 ----------- -------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2012-10- 10 14:30:44.843
!MESSAGE异常启动Eclipse平台:
!STACK
java.lang.RuntimeException:无法在org.eclipse.equinox.launcher中找到框架
.Main.getBootPath(Main.java:978)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:557)
at org.eclipse.equinox.launcher.Main.run (Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
ADDED
从这个网站,问题是因为我没有正确设置%R2_HOME%/ plugins
。设置后,我仍然得到的错误。
java.lang.IllegalStateException:无法获取应用程序服务。确保org.eclipse.core.runtime捆绑包已解决并启动(请参阅config.ini)。
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java: 344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native方法)
at sun。 (java.lang.reflect.Method.invoke)中的
方法。java.lang.reflect.Method.invoke(Method.java:localMethodAccessorImpl.java:23)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
at org .eclipse.core.launcher.Main.main(Main.java:34)
无头Eclipse的实例需要包括许多插件,而不仅仅是你的插件。最小产品包括:
-
org.eclipse.core.runtime
-
org.eclipse.core.variables
- < your plugin's here> li>
EDIT
这里是我的最小无头Eclipse使用的插件列表:
我输出的产品,这里是加载的插件列表:
org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar
org.eclipse.core。 jobs_3.5.1.R36x_v20100824.jar
org.eclipse.core.runtime.compatibility.auth_3.2.200.v20100517.jar
org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100520
org.eclipse.core.runtime_3.6.0.v20100505.jar
org.eclipse.equinox.app_1.3.1.R36x_v20100803.jar
org.eclipse.equinox.common_3.6.0.v20100503.jar
org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
org.eclipse.equinox.preferences_3.3.0。 v20100503.jar
org.eclipse.equinox.registry_3.5.0.v20100503.jar
org.eclipse.osgi.services_3.2.100.v20100503.jar
org.eclipse.osgi.util_3.2.100 .v20100503.jar
org.eclipse.osgi_3.6.2.R36x_v20110210.jar
我可能建议您为您正在构建的Eclipse应用程序创建一个产品,并尝试。寻找一个常见问题我发现这个。 http://wiki.eclipse.org/FAQ_What_is_the_minimal_Eclipse_configuration%3F
Following this instruction, I could run headless Eclipse plugin in side Eclipse IDE.
I've got some error log info, but I guess I could ignore it based on this post - Unable to find feature.xml in directory
Following the instruction in site, I could generate the jar file. After copying the org.eclipse.equinox.launcher.jar, I tried to execute the jar file
java -jar org.eclipse.equinox.launcher_1.2.0.v20110502.jar -application headlessHello_1.0.0.201210101430.jar
I tried
java -cp .:org.eclipse.equinox.launcher_1.2.0.v20110502.jar org.eclipse.core.launcher.Main -application headlessHello_1.0.0.201210101430.jar
to get error message
An error has occurred. See the log file
/Users/users/Desktop/configuration/1349897444823.log
with this log file
!SESSION Wed Oct 10 14:30:44 CDT 2012 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2012-10-10 14:30:44.843
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.RuntimeException: Could not find framework
at org.eclipse.equinox.launcher.Main.getBootPath(Main.java:978)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:557)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
ADDED
From this site, the issue was because I didn't setup %R2_HOME%/plugins
correctly. After the setup, I still get the error.
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
at org.eclipse.core.launcher.Main.main(Main.java:34)
An instance of headless Eclipse needs to include many plugins, not just your plugin. A minimal product includes:
org.eclipse.core.runtime
org.eclipse.core.variables
- <your plugin(s) here>
EDIT
I generated the product, and here is the list of plugins used by my "minimal" headless Eclipse:
I output the product, and here is the list of plugins loaded:
org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar
org.eclipse.core.jobs_3.5.1.R36x_v20100824.jar
org.eclipse.core.runtime.compatibility.auth_3.2.200.v20100517.jar
org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100520
org.eclipse.core.runtime_3.6.0.v20100505.jar
org.eclipse.equinox.app_1.3.1.R36x_v20100803.jar
org.eclipse.equinox.common_3.6.0.v20100503.jar
org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
org.eclipse.equinox.preferences_3.3.0.v20100503.jar
org.eclipse.equinox.registry_3.5.0.v20100503.jar
org.eclipse.osgi.services_3.2.100.v20100503.jar
org.eclipse.osgi.util_3.2.100.v20100503.jar
org.eclipse.osgi_3.6.2.R36x_v20110210.jar
So, might I recommend that you create a product for this Eclipse application you are building, and try that. Looking for a FAQ I found this. http://wiki.eclipse.org/FAQ_What_is_the_minimal_Eclipse_configuration%3F
这篇关于在命令行中执行无头的日食的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!