1

I am new to Ubuntu. Currently I am using Ubuntu 16.04 I would like to install Eclipse

I have followed the steps mentioned in this document http://ubuntuhandbook.org/index.php/2016/01/how-to-install-the-latest-eclipse-in-ubuntu-16-04-15-10/

But at the 3rd step I get the following error

An error has occurred please see the log file null

Upon checking for the error via the terminal I am getting the following

shiv@shiv-HP-Notebook:~/Softwares/Eclipse/eclipse-installer$ ./eclipse-inst 
java.lang.ExceptionInInitializerError
at org.eclipse.osgi.storage.Storage.<init>(Storage.java:101)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:88)
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>    (EquinoxContainer.java:66)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:303)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:239)
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:547)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @b9afc07
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:335)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:278)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.findMethod(FrameworkExtensionInstaller.java:51)
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.findMethod(FrameworkExtensionInstaller.java:58)
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.findAddURLMethod(FrameworkExtensionInstaller.java:42)
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.<clinit>(FrameworkExtensionInstaller.java:36)
... 14 more

Could anyone please tell where I am making a mistake. Thank you

*****************************UPDATE************************************

I tried to install in a new way.

sudo apt-get update
sudo apt-get install eclipse

And when I try to launch it I get the following error in a dialog box

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

Below are the details of the Log file

!SESSION 2017-02-28 14:16:16.279    -----------------------------------------------

eclipse.buildId=debbuild
java.version=9-ea
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IN
Command-line arguments:  -os linux -ws gtk -arch x86_64 -clean -initialize

!ENTRY org.eclipse.osgi 4 0 2017-02-28 14:16:16.693
!MESSAGE error loading hook: org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator
!STACK 0
java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @402a079c
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:335)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:278)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.findMethod(BaseStorage.java:174)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.findMethod(BaseStorage.java:181)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.findAddURLMethod(BaseStorage.java:165)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.<init>(BaseStorage.java:135)
at org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator.addHooks(BaseHookConfigurator.java:24)
at org.eclipse.osgi.baseadaptor.HookRegistry.loadConfigurators(HookRegistry.java:178)
at org.eclipse.osgi.baseadaptor.HookRegistry.initialize(HookRegistry.java:100)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.<init>(BaseAdaptor.java:98)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:473)
at org.eclipse.core.runtime.adaptor.EclipseStarter.createAdaptor(EclipseStarter.java:737)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:258)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:547)
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)

!ENTRY org.eclipse.osgi 4 0 2017-02-28 14:16:16.795
!MESSAGE Startup error
!STACK 1
java.lang.NullPointerException
at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:262)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:547)
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)
  • Perhaps it should go with sudo ./eclipse-inst, and if you prefer the repo version then sudo apt-get update and sudo apt-get install eclipse, but note would not be the latest. – George Udosen Feb 28 '17 at 8:03
  • pls add the 14 more lines – George Udosen Feb 28 '17 at 8:07
  • I get the same error even with sudo ./eclipse-inst – Shivanand T Feb 28 '17 at 8:27
  • Do u need the latest version, and pls add those 14 lines absent fro error message – George Udosen Feb 28 '17 at 8:36
  • Well, I am trying to those 14 lines but however I try to arrange the size of terminal I cant see them. COuld you please tell how can I see them – Shivanand T Feb 28 '17 at 8:44
3

Are you installing the Eclipse from Ubuntu Repository(which has a very old version) or from Internet?

I can give you a better tip to install Eclipse easily on any Ubuntu higher than 14.04.

First you launch java from Webupd8 PPA(it will put the java jdk very easy on Linux).

After that, you can download Eclipse from it's website and launch from its GUI application.(Don't need to install it from terminal, I never install Eclipse from Terminal.)

  • 1
    yes I did it this way, it worked :) – Shivanand T Feb 28 '17 at 11:25
  • @ShivanandT if it worked please accept it as the correct answer! – George Udosen Mar 2 '17 at 13:36
  • @ShivanandT yes you can accept my answer, so others can also see the solution. – Egrimo Mar 2 '17 at 20:30
1

I have found a temporary solution. If I change my Java to version 8 everything works fine. Earlier I tried with version 9 and found those errors

  • 1
    Eclipse 3.8, which is very old, does not support Java 9. Full support will be in Eclipse Oxygen (4.7) later this year. The current Eclipse Neon (4.6.2) should run on Java 9. – greg-449 Mar 1 '17 at 7:56
  • My current version is Eclipse Neon 4.6.2 but it did not work on Java 9 – Shivanand T Mar 2 '17 at 8:21
  • OK, so they still haven't fixed all the problems. In which case only Eclipse Oxygen (4.7) will run on Java 9. There are Milestone releases of this but it won't be fully released until June 2017. – greg-449 Mar 2 '17 at 8:24

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.