0

I have installed eclipse in my new system Ubuntu 18.04 LTS with apt-get install eclipse; but when i'm trying to execute eclipse I got this message on dialog box:An error occured And the app stops running.

And in the the log file from Eclipse I see this:

!SESSION Thu Apr 11 12:43:08 GMT 2019 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-04-11 12:43:08.394
!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)

Could someone give an help ?

1 Answers1

0

Based on this answer you can do this:

In your config.ini file of eclipse eclipse\configuration\config.ini check this three things:

osgi.framework=file\:plugins\\org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.0.v20080604.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator\\bundles.info

And check whether these jars are in place or not, the jar files depend upon your version of eclipse

You can install OpenJDK 8 using instructions from this answer. Also there you will find the way to use alternatives.

sudo update-alternatives --config java
sudo update-alternatives --config javac
  • It still confuse for me; I don't understand exactly – hackthatos Apr 12 '19 at 13:49
  • Check if you have such records in ini file. And if the jar files are on those locations – Romeo Ninov Apr 12 '19 at 13:55
  • This is what i have in the .ini file – hackthatos Apr 12 '19 at 14:01
  • I don't know if it is the same; this is the .ini file I have: osgi.framework=file\:plugins/org.eclipse.osgi_3.8.1.dist.jar osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar@1\:start org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info the main differrence is the number replaced with dist – hackthatos Apr 12 '19 at 14:08
  • @hackthatos, seems you have them all. Did you check the required version of jdk and what version do you have installed? – Romeo Ninov Apr 12 '19 at 14:15
  • See openjdk 10.0.2 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode) – hackthatos Apr 12 '19 at 14:17
  • @hackthatos, IMHO try with OpenJDK 8 – Romeo Ninov Apr 12 '19 at 14:19
  • @RomeoNivo You mean I have to install OpenJDK8 despite I have the version 10 already installed? – hackthatos Apr 12 '19 at 14:24
  • @hackthatos, AFAIK you can install both of them and use alternatives. Or hardcode in eclipse start script JAVA_HOME to version 8. – Romeo Ninov Apr 12 '19 at 14:25
  • please give me the command to install the other and ue alternative; I am novice – hackthatos Apr 12 '19 at 14:31
  • @hackthatos, please check my updated answer – Romeo Ninov Apr 12 '19 at 14:46
  • I have used the alternative option. after that i get this this openjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode) with this command java -version but the problem persists – hackthatos Apr 12 '19 at 15:08