I have installed OpenJDK 9 in Ubuntu 17.10. I wanted to start developing in Java, and I did setup JAVA_HOME variable and did some stuff I found on the internet. I can compile a Java program and run it, but I cannot install an IDE, which would be really necessary.

The error message is:

An error has occurred. See the log file /home/erik/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1531145712071.log.

The log file contains:

!SESSION 2018-07-09 16:15:11.911 -----------------------------------------------
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.equinox.simpleconfigurator 4 0 2018-07-09 16:15:12.423
!MESSAGE FrameworkEvent ERROR
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.simpleconfigurator_1.0.301.dist [1]" could not be resolved. Reason: Missing Constraint: Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2018-07-09 16:15:12.429
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar was not resolved.

!ENTRY org.eclipse.osgi 2 0 2018-07-09 16:15:12.435
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2018-07-09 16:15:12.435
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.simpleconfigurator_1.0.301.dist.jar was not resolved.
!SUBENTRY 2 org.eclipse.equinox.simpleconfigurator 2 0 2018-07-09 16:15:12.435
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.1))(&(osgi.ee=JavaSE)(version=1.4)))".

!ENTRY org.eclipse.osgi 2 0 2018-07-09 16:15:12.436
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2018-07-09 16:15:12.436
!MESSAGE Bundle org.eclipse.equinox.simpleconfigurator_1.0.301.dist [1] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.simpleconfigurator 2 0 2018-07-09 16:15:12.436
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.1))(&(osgi.ee=JavaSE)(version=1.4)))".

!ENTRY org.eclipse.osgi 4 0 2018-07-09 16:15:12.437
!MESSAGE Application error
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    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)
  • Hi Gameerik and welcome to askUbuntu! Format you post according to this link askubuntu.com/editing-help#code. This will help to make the post more readable. E.g.: You can also select the code and press CTRL+K to toggle indenting as code. – abu_bua Jul 9 '18 at 14:35

The Eclipse snap package from the default Ubuntu repositories is perfect for Java programming because it is bundled with a Java development environment. To install it open the terminal and type:

sudo snap install eclipse --classic  

This command will install the latest Photon Release 4.8 version of Eclipse IDE for Java Developers which was updated 8 days ago. Eclipse changed its codename policy so that Eclipse releases from September 2018 and onward are named after the year and month of the release date, for example Eclipse 2020-06. This naming scheme also applies to the eclipse snap package.

Photon JDT supports Java 9 completely:

  • The Eclipse compiler for Java (ECJ) implements all the new Java 9 language enhancements.
  • Updated significant features to support Java Modules, such as compiler, search and many editor features.

Though I always prefer packages from the Ubuntu distro, I make an exception for Eclipse because it (a) is trivial to install, (b) must be installed as user (no root required or recommended), and (c) it manages its own updates and plugins very well - including rollbacks, etc.

The instructions below work for all Eclipse IDEs (Java, C/C++, Web, PHP, etc).

  1. Install the JDK

    sudo apt install default-jdk
  2. Download the latest Eclipse installer from eclipse.org. Currently this is Eclipse Photon.

  3. Unpack it in a directory of your choice

    mkdir -p ~/eclipse/installer
    tar -C ~/eclipse/installer -xzf ~/Downloads/eclipse-inst-linux64.tar.gz
  4. Run the installer

    cd ~/eclipse/installer
  5. Pick your IDE and follow the prompts

When done, start your IDE with the eclipse script in the directory eclipse underneath where you installed the IDE.

To uninstall any Eclipse IDE, simply rm -r its installation directory. If you are obsessive about kruft pollution then also rm -rf ~/.eclipse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.