Ubuntu – Eclipse doesn’t start on Ubuntu 18.04

18.04eclipse

I installed eclipse via Ubuntu Software. When I start it, it take some seconds and then comes an error window showing the path of the error.

The following is the .log file:

!SESSION Wed May 02 12:53:28 BRT 2018 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2018-05-02 12:53:28.587
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
    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)

What is the problem and how can I fix it?

Best Answer

It's another one of those fun new bugs caused by the new Java (it broke Arduino, too, in multiple annoying ways). The bug report is here: https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/1754886.

Essentially, there's some sort of recursive dependency with multiple versions of a library required by different parts of the program, and they won't fix the bug since "This is only one of the more obvious bugs affecting Eclipse" and they don't have enough people on it.

For some reason, they also have not packaged the newer Eclipse (we are an entire major version later at this point) except in the Snap Store (it shows up if you search Eclipse in the GUI software center), which is where the mentioned "other version of Eclipse" comes from.

Your options are to download Eclipse from their site or to install the Snap if you want to keep using the program (and Netbeans broke too, for the same Java reasons). I would personally install the version from their site, but snaps hypothetically are safer and easier to set up.

Related Question