I have been working in Eclipse for a while and recently I had to change java_home for some other application. Since then my Eclipse doesn't start. I have followed all the solutions posted to questions similar to this but no use. These are some details regarding the problem.
java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
javac -version
javac 1.8.0_92
When I try to open Eclipse through terminal via open Eclipse.app/ , I get prompt to look at the following log at /Eclipse.app/Contents/Eclipse/configuration/1465758949259.log
!SESSION 2016-06-12 12:15:49.142 -----------------------------------------------
eclipse.buildId=4.5.2.M20160212-1500
java.version=1.8.0_92
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.cpp.product - keyring /Users/***/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.cpp.product -keyring /Users/***/.eclipse_keyring -showlocation
!ENTRY org.eclipse.osgi 4 0 2016-06-12 12:15:50.124
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at org.eclipse.swt.widgets.Display.applicationWillFinishLaunching(Display.java:5244)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5344)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.finishLaunching(Display.java:5025)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5321)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.finishLaunching(NSApplication.java:59)
at org.eclipse.swt.widgets.Display.init(Display.java:2221)
at org.eclipse.swt.graphics.Device.<init>(Device.java:131)
at org.eclipse.swt.widgets.Display.<init>(Display.java:721)
at org.eclipse.swt.widgets.Display.<init>(Display.java:712)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:790)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:169)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:111)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
config.ini
#This configuration file was written by:
org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Thu Feb 18 03:26:43 EST 2016
org.eclipse.update.reconcile=false
eclipse.p2.profile=epp.package.cpp
osgi.instance.area.default=#user.home/Documents/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.10.102.v20160118-1700.jar
equinox.use.ds=true
eclipse.buildId=4.5.2.M20160212-1500
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.1.100.v20150423-1455.jar#1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551.jar
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.p2.data.area=#config.dir/../p2
osgi.bundles.defaultStartLevel=4
eclipse.ini
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
In the previous questions, many have suggested to remove few files in the .metadata folder in workspace. I have tried completely removing the workspace itself but still Eclipse won't start. I have also tried ./eclipse -clean. Any guide would be really helpful.
Related
Below is the JAVA version installed in my Ubuntu:-
openjdk version "1.8.0_312" OpenJDK Runtime Environment (build
1.8.0_312-8u312-b07-0ubuntu1~20.04-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
Eclipse Installed version:-
Eclipse IDE for Java Developers Version: 2019-12 (4.14.0) Build id: 20191212-1212
Steps which I followed to compile my code:-
source path of SDK
Run cMake command
make generate
I am getting below error at step3:-
JVM terminated. Exit code=4 /usr/bin/java
-jar /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
-os linux
-ws gtk
-arch x86_64
-launcher /home/xman/ELINALITE/elina
-name Elina
--launcher.library /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316/eclipse_1607.so
-startup /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.overrideVmargs
-exitdata 8027 ............ ............
-vm /usr/bin/java
-vmargs
-jar /home/xman/ELINALITE//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
Below is the content of my /snap/eclipse/48/eclipse.ini file?
-startup plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product org.eclipse.epp.package.java.product
-showsplash org.eclipse.epp.package.common
--launcher.defaultAction openFile
--launcher.defaultAction openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
Can somebody help me to resolve this error?
I am using version 4.7.3 of Eclipse. I am on a MAC. Until yesterday, all my project were configured with Java 8. Yesterday, I configured only one project with Java 11 jre. Today, when I tried to open Eclipse, I had the following error
!SESSION 2020-12-05 10:08:55.574 -----------------------------------------------
eclipse.buildId=4.7.3.M20180330-0640
java.version=11.0.9
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/admin/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/admin/.eclipse_keyring
!ENTRY org.eclipse.core.net 1 0 2020-12-05 10:08:59.662
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
!ENTRY org.eclipse.core.resources 2 10035 2020-12-05 10:09:05.489
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.osgi 4 0 2020-12-05 10:09:06.389
!MESSAGE Application error
!STACK 1
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:410)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:491)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:505)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
... 22 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 24 more
Here is the eclipse.ini file
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.551.v20171108-1834
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.8
-Xms2048m
-Xmx6g
--add-modules=ALL-SYSTEM
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-javaagent:/Applications/Eclipse.app/Contents/Eclipse/lombok.jar
I read several post about this error, but none resolved this issue
Your Eclipse is trying to run using the Java 11 installation, but 4.7.3 is too old to work with Java 11.
You can upgrade to the current Eclipse 2020-09 (4.17) (soon to be 2020-12) which can run with Java 11 (in fact it requires Java 11 or later).
Or you can edit the eclipse.ini and add a -vm setting to specify the older Java 8.
On macOS the eclipse.ini is in the Eclipse.app - /Applications/Eclipse.app/Contents/Eclipse/eclipse.ini
Am getting below error , when trying to open eclipse oxygen , in Red Hat Linux env 64 bit. installed jdk 8 also in the linux env.
JVM terminated. Exit code=1
/usr/java/jdk1.7.0_67-cloudera/bin/java
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /home/cloudera/Downloads/eclipse//plugins
/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /home/cloudera/Downloads/eclipse//plugins
/org.eclipse.epp.package.common_4.7.3.20180405-1200/splash.bmp
-launcher /home/cloudera/Downloads/eclipse/eclipse
-name Eclipse
--launcher.library /home/cloudera/Downloads/eclipse//plugins
/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.551.v20171108-1834
/eclipse_1630.so
-startup /home/cloudera/Downloads/eclipse//plugins
/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.appendVmargs
-exitdata 100015
-product org.eclipse.epp.package.jee.product
-vm /usr/java/jdk1.7.0_67-cloudera/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-jar /home/cloudera/Downloads/eclipse//plugins
/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
This looks like eclipse is configured to use the wrong java version. Required is 1.8. But uses 1.7
When I tried to run a plug-in project as Eclipse Application, I get following error.
eclipse.buildId=unknown
java.version=1.8.0_152
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.platform.ide
Command-line arguments: -product org.eclipse.platform.ide -data /{HOME}/eclipse-workspace/../runtime-New_configuration -dev file:/{HOME}/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arc$
!ENTRY org.eclipse.osgi 4 0 2017-12-07 23:43:27.145
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-4530 in java.library.path
no swt-win32 in java.library.path
Can't load library: /{HOME}/.swt/lib/macosx/x86_64/libswt-win32-4530.jnilib
Can't load library: /{HOME}/.swt/lib/macosx/x86_64/libswt-win32.jnilib
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:327)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:236)
at org.eclipse.swt.internal.C.<clinit>(C.java:16)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:774)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:169)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:111)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
Then, I found out that the folder "/{HOME}/.swt/lib/macosx/x86_64" acctually is empty. I guess this is the reason, but I do not know how to reinstall SWT(I have googled a while though)
Eclipse Version: Oxygen.1a Release (4.7.1a) (64-bit)
Java Version:
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
Mac Version: 10.12 (64-bit)
The command line arguments:
-os win32 -ws win32
show that you are trying to run this as a Windows application - which isn't going to work on macOS
Check that the Arguments tab of the Run Configuration has something like:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
in the program arguments and that the 'Environment' section of your current Target Platform is blank or specifies macOS.
I have downloaded eclipse 64 bit and my os is 64 bit fedora
but am getting below error when i try to open eclipse..
i dont know its a os issue or eclipse issue
when i type java - version
iam being shown with
java version "1.7.0_51"
OpenJDK Runtime Environment (fedora-2.4.5.1.fc20-x86_64 u51-b31)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
JVM terminated. Exit code=13
/usr/bin/java
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/kranthikumar.sama/Downloads/Eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-os linux
-ws gtk
-arch x86
-showsplash /home/kranthikumar.sama/Downloads/Eclipse/eclipse//plugins/org.eclipse.platform_4.2.1.v201209141800/splash.bmp
-launcher /home/kranthikumar.sama/Downloads/Eclipse/eclipse/eclipse
-name Eclipse
--launcher.library /home/kranthikumar.sama/Downloads/Eclipse/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813/eclipse_1502.so
-startup /home/kranthikumar.sama/Downloads/Eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 260005
-product org.eclipse.epp.package.dsl.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/kranthikumar.sama/Downloads/Eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
here is my eclipse.ini file
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.dsl.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m