1

I am trying to use Eclipse CDT under Ubuntu 18.04 LTS. I get the same error as many others, but I could not find a solution in what I read.

I try to launch with

$ eclipse &
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0

and I get

/home/user1/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1551271296090.log

When checking /usr/lib/eclipse/configuration/config.ini (as per this) I found the following lines (among others)

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

As for the first two lines, I have files

$ locate eclipse.osgi_
/usr/share/java/org.eclipse.osgi_3.8.1.dist.jar

$ locate simpleconfigurator_1
/usr/lib/eclipse/plugins/org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar

Nevertheless:

  1. /usr/share/java/org.eclipse.osgi_3.8.1.dist.jar seems to belong to no package (a remnant of some old package?), since

    $ apt-file search /usr/share/java/org.eclipse.osgi_3.8.1.dist.jar
    

    gives no results.

  2. I have ver 3.9.1

    $ dpkg -l | grep libequinox-osgi-java
    ii  libequinox-osgi-java                          3.9.1-1                               all          Equinox OSGi framework
    $ dpkg -L libequinox-osgi-java
    /.
    /usr
    /usr/share
    /usr/share/doc
    /usr/share/doc/libequinox-osgi-java
    /usr/share/doc/libequinox-osgi-java/changelog.Debian.gz
    /usr/share/doc/libequinox-osgi-java/copyright
    /usr/share/java
    /usr/share/java/org.eclipse.osgi-3.9.1.jar
    /usr/share/maven-repo
    /usr/share/maven-repo/org
    /usr/share/maven-repo/org/eclipse
    /usr/share/maven-repo/org/eclipse/osgi
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1/org.eclipse.osgi-3.9.1.pom
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian/org.eclipse.osgi-debian.pom
    /usr/share/java/org.eclipse.osgi.jar
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/3.9.1/org.eclipse.osgi-3.9.1.jar
    /usr/share/maven-repo/org/eclipse/osgi/org.eclipse.osgi/debian/org.eclipse.osgi-debian.jar
    

So I do not know if the problem is here.

How can I solve this?

Could not find an answer here

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891956

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898086

https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/1754886

https://ubuntu.pkgs.org/16.04/ubuntu-universe-i386/libequinox-osgi-java_3.8.1-8_all.deb.html

https://askubuntu.com/questions/1031171/eclipse-doesnt-start-on-ubuntu-18-04

  • 1
    This looks like a very old Eclipse version. Probably it cannot be run with Java 9 or higher. An upgrade of Eclipse to 2019-12 or a downgrade of Java to 8 should fix the issue. – howlger Feb 27 '19 at 14:38
  • @howlger - Tried to use Java 8, but faced this problem... https://askubuntu.com/questions/1121776/java-10-to-8-update-alternatives-error-no-alternatives-for-mozilla-javaplugin – sancho.s ReinstateMonicaCellio Feb 27 '19 at 19:08
  • The Java JRE can be put into the subfolder `jre` of your Eclipse installation or [specified in the `eclipse.ini`](https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM). – howlger Feb 27 '19 at 21:13
  • @howlger - I am not in front of the computer in question now, but I will try that. Besides, I think I have Eclipse Neon (the latest available with apt-get, for Ubuntu 18.04LTS), which is ver 4.6, and as per [this](https://wiki.eclipse.org/Eclipse/Installation) "A Java 8 JRE/JDK is required to run all Neon packages based on Eclipse 4.6". It doesn't mention anything about problems with Java > 8. I will try and get back. – sancho.s ReinstateMonicaCellio Feb 27 '19 at 22:37
  • Eclipse Neon (4.6) has been released 2016, more than one year before Java 9 has been released. The problem is mentioned at top of the page you linked: [_"If using Java 9 or newer please use Eclipse 4.7.1a or newer as it contains fixes in Eclipse launcher to add all JVM modules._"](https://wiki.eclipse.org/Eclipse/Installation). – howlger Feb 28 '19 at 07:57
  • @howlger - Please post an answer. Your suggestion worked. Thanks. – sancho.s ReinstateMonicaCellio Feb 28 '19 at 13:13

1 Answers1

1

You are probably using an older Eclipse version that does not work with Java 9 or higher:

If using Java 9 or newer please use Eclipse 4.7.1a or newer as it contains fixes in Eclipse launcher to add all JVM modules.

Do one of the following to solve the problem:

howlger
  • 31,050
  • 11
  • 59
  • 99
  • I downloaded a new version of eclipse, expanded it, and it worked out of the box for one user, and it did not for another user (I have to check why). I still had problems when trying to use Java 8 (which I have already installed) with my old current version of Eclipse. – sancho.s ReinstateMonicaCellio Feb 28 '19 at 16:52
  • @sancho.s In older OpenJDK Java 8 releases the certificate authority (CA) certificates are missing (causing HTTPS and SSH to fail). As far as I know, in current OpenJDK Java 8 releases, only JavaFX and fonts are missing. – howlger Feb 28 '19 at 21:19
  • I was not clear I guess... The problem was that [I could not revert to the old Java 8](https://askubuntu.com/questions/1121776/java-11-to-8-update-alternatives-error-no-alternatives-for-mozilla-javaplugin). – sancho.s ReinstateMonicaCellio Mar 01 '19 at 10:20
  • @sancho.s You can manually download an OpenJDK as `.tar.gz` from https://adoptopenjdk.net/ – howlger Mar 01 '19 at 10:22