Issue
I want to install Eclipse for Java on my "Raspberry Pi 4 Model B". As soon as I want to run it the Eclipse start-screen appears but then there is a message that an error has occured. The log-file looks like this:
!SESSION Mon Oct 14 03:13:04 CEST 2019 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-10-14 03:13:04.923
!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:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
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)
I installed Eclipse using the command sudo apt-get install eclipse
and I had removed Java before I installed Eclipse. I have tried this several times but Eclipse does not work. I have already found that question on stackoverflow(Running Eclipse-CDT on Ubuntu 18.04 causes java.lang.ClassNotFoundException) but the answer just caused a longer log file. I hope that there is a solution.
Thanks!
Solution
You will need to use a version 8 OpenJDK like from https://adoptopenjdk.net/releases.html, or a different distribution that builds Eclipse packages, like Fedora. Eclipse.org doesn't build for ARM platforms, and Debian/Raspbian's version is 7 years out of date--it does not work with the Java versions newer than 8 (2012 was the early days of Java 7).
Answered By - nitind