Eclipse Not Starting After Ubuntu 16.04 LTS Upgrade – Troubleshooting Guide

16.04eclipseupgrade

I just upgraded to 16.04 from 14.04 LTS, and suddenly Eclipse won't start. Here's the Eclipse log file:

!SESSION 2016-08-28 19:43:46.941 -----------------------------------------------
eclipse.buildId=debbuild
java.version=1.8.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 2 0 2016-08-28 19:43:47.899
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-28 19:43:47.899
!MESSAGE Bundle reference:file:plugins/org.eclipse.compare.core_3.5.200.dist.jar was not resolved.
!SUBENTRY 2 org.eclipse.compare.core 2 0 2016-08-28 19:43:47.899
!MESSAGE Missing imported package com.ibm.icu.text_3.6.1.
!SUBENTRY 2 org.eclipse.compare.core 2 0 2016-08-28 19:43:47.899
!MESSAGE Missing imported package com.ibm.icu.util_3.6.1.
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-28 19:43:47.899
!MESSAGE Bundle reference:file:plugins/org.eclipse.ui.workbench_3.8.1.dist.jar was not resolved.
!SUBENTRY 2 org.eclipse.ui.workbench 2 0 2016-08-28 19:43:47.899
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.4))(&(osgi.ee=CDC/Foundation)(version=1.1)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2016-08-28 19:43:47.900

… several pages of similar log error messages later …

!ENTRY org.eclipse.osgi 4 0 2016-08-28 19:43:48.011
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.update.core.standaloneUpdate, org.eclipse.update.core.siteOptimizer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.jdt.apt.core.aptBuild.
    at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
    at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    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:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Anyone else encountered this?

Edit: upgrading to Eclipse 4.2 gives this error:

JVM terminated. Exit code=13
/usr/bin/java
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar /home/_____/eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-os linux
-ws gtk
-arch x86
-showsplash /home/_____/eclipse/eclipse//plugins/org.eclipse.platform_4.2.0.v201206081400/splash.bmp
-launcher /home/_____/eclipse/eclipse/eclipse
-name Eclipse
--launcher.library /home/_____/eclipse/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813/eclipse_1502.so
-startup /home/_____/eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 18800a
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar /home/_____/eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar 

Screenshot

There seems to be a bunch of missing dependencies:

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /opt/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120913-144807/eclipse_1502.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"

(Eclipse:17614): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

I ran

sudo apt-get install unity-gtk-module-common:i386

but get this message:

Note, selecting 'unity-gtk-module-common' instead of 'unity-gtk-module-common:i386'
unity-gtk-module-common is already the newest version (0.0.0+15.04.20150118-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Trying to install overlay-scrollbar just says it's already the latest. Trying overlay-scrollbar:i386 gives this message:

Package overlay-scrollbar:i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

I also tried downgrading Java to 1.7 using sudo update-java-alternatives, which also doesn't remove the initial error

Best Answer

Yes. Thats it. Eclipse 3.8 doesn't seems to work with java 8. So you need to install eclipse 4.2 (Luna) if you need to use Java 8. And I prefer to use Oracle Java rather than open jdk. Go ahead with the eclipse 4.2 and oracle java 8.

Related Question