简体   繁体   中英

Eclipse not starting in ubuntu 12.04

I am trying to start eclipse from terminal with the following command

./eclipse -vm ~/jdk1.5.0_22/bin/java

but I get the following error

"An error has occurred. See the log file
      /.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1427693670657.log."

On checking the log file, I get the following error

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)

I suppose I am starting eclipse with the required version of JDK which is 1.5 but do not know why this error occurs. Can someone please tell me why does this error occur?

My eclipse.ini file is below

-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            

Please try adding vm location in eclipse.ini

-vm C:/Program Files/Java/jdk1.7.0_75/bin/javaw.exe

The error occurred because I unknowingly deleted the jre which was referenced/used by eclipse and tried starting it with another jre version present in different directory. This got resolved when i restored the required jre back to the folder from which it was deleted.

-vm parameter requires the JRE location to be in a single line. For example

-vm
C:/Program Files/Java/jdk1.7.0_75/bin/javaw.exe

Obviously the path must point to an existing Java installation. Java 1.5 is rather old, I'm not sure whether Eclipse still runs with it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM