我正尝试使用以下命令从终端启动eclipse
./eclipse -vm ~/jdk1.5.0_22/bin/java
但是我收到以下错误
"An error has occurred. See the log file
/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1427693670657.log."
在检查日志文件时,我收到以下错误
ENTRY org.eclipse.osgi 4 0 2015-03-30 11:04:32.858
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in "org.eclipse.ui.ide.application" was unable to instantiate class "org.eclipse.ui.internal.ide.application.IDEApplication".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
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)
我想我正在使用1.5的所需JDK版本开始eclipse,但不知道为什么会出现这个错误。有人可以告诉我为什么会出现这个错误?
我的eclipse.ini文件位于
之下-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
答案 0 :(得分:0)
请尝试在eclipse.ini中添加vm位置
-vm C:/ Program Files / Java / jdk1.7.0_75 / bin / javaw.exe
答案 1 :(得分:0)
发生错误是因为我在不知不觉中删除了eclipse引用/使用的jre,并尝试使用另一个目录中存在的另一个jre版本启动它。当我将所需的jre恢复到删除它的文件夹时,这个问题得到了解决。
答案 2 :(得分:0)
-vm参数要求JRE位置在一行中。 例如
-vm
C:/Program Files/Java/jdk1.7.0_75/bin/javaw.exe
显然,路径必须指向现有的Java安装。 Java 1.5相当陈旧,我不确定Eclipse是否仍然使用它。