How to run Eclipse 4.6.2 on Tumbleweed?

Hi,

I have installed Eclipse from my own OBS project and whenever I try to start it, it crashes on startup. It logs its errors to $HOME/workspace/.metadata/.log and here it is. I have tried using Java 9 and Java 8 to launch it. I have also installed NetBeans and with Java 8 it launches fine, so this isn’t due to Java being bug-riddled.

Thanks for your time,
Brenton

I have also tried installing Eclipse using the eclipse-inst.tar.gz tarball provided by the Eclipse project but the installer fails to even launch.

@fusion809,
Although you are also having a problem, the specific causes for yours may be different so should be posted in a new thread.

Responding to both above posts,
Although I haven’t installed eclipse recently, I can answer based on an entire history of Eclipse on openSUSE which hasn’t changed much over a decade or more…

Personally,
Unless there is a good reason to do otherwise, the distro should be as stable as possible. When you Develop, you’ll be working with very unstable code, so anything that can limit the amount of unstable external causes is helpful. When I’m creating apps which might contain faulty code, I don’t want to also have to consider whether the build environment is also unpredictably unstable. So, for instance I recommend setting up on LEAP over Tumbleweed. Or, if you prefer TW as your installed OS, then consider running your Development in a virtual machine (it’s often acceptable, but depending on what you’re doing not always an option).

You can install eclipse both from the OSS and as a download from eclipse.org.
Most experienced Developers will recommend a download from eclipse.org over the OSS for a number of reasons… Personally, I prefer the customized packages from eclipse.org that support specific types of solutions and coding languages. If you instead take the approach to do the customization yourself, it can be a very big task and may or may not be complete for what you want to do.

When you “install” a download from eclipse, the “install” does little more than uncompress a completely self-contained directory tree which can be placed where you choose. What this then means is that there are generally few dependencies(sometimes none) and it is a very big deal if you place it in your /home directory or somewhere in your /root directory. Personally, regardless where I’ve placed eclipse, I’ve set it up to run with elevated permissions, and this is fairly common for Development. If you’re creating things, that’s a pretty elevated role anyway, so it’s not that big a deal to configure Development to be running with root or sudo permissions. It’s also why Development machines maybe should not be the same as the machine you use for normal, personal Internet use.

If you’re building Java apps, some final configuration is required. See your Eclipse documentation. IIRC, you have to set your environmental variables(path and $HOME) in the eclipse configuration (preferences?), and sometimes I’ve also over-ridden even what is in eclipse by specifying in a /etc/profile.local file. Also, don’t forget to install the Java development packages, not just the JRE packages. You may also need to install some “helper” apps separately, like ant for you java compiler.

HTH,
TSU

I tried installing from eclipse.org that’s what the eclipse-inst.tar.gz archive was. It failed as the installer crashed. I am happy to ditch my Eclipse package but I would still like some mechanism to install Eclipse… The error it gives when I try to launch the installer and it crashes is:


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(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        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 @4f51b3e0
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Unknown Source)
        at java.base/java.lang.reflect.Method.setAccessible(Unknown Source)
        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

For anyone to be able to replicate your error,
You’ll need to

  • Provide a link to the <exact> download from eclipse.org you’re using.
  • The Tumbleweed version you’re using (and possibly whether you’ve run “zypper dup” recently).
  • The version of Java you’re using. Typically, nowadays I’d recommend openjdk from the OSS. The following verifies the default is installed (including the JDK parts which are not installed by default with the base openjdk)
zypper in openjdk openjdk-devel

As usual, you may want to make sure you can install something like eclipse properly on a local machine before you try doing it in the cloud (if that is what you may be doing).

TSU

this is the tarball I used. I used Java 8 (specifically java-1_8_0-openjdk-1.8.0.121-2.1) to run it, but I have tried using Java 9 (specifically java-1_9_0-openjdk-9.0.0.0~155-1.1) also. My VERSION_ID (for Tumbleweed) in /etc/os-release is VERSION_ID=“20170211”.

On Mon 13 Feb 2017 01:56:02 AM CST, fusion809 wrote:

‘this is the tarball’ (http://tinyurl.com/zqfrszj) I used. I used Java 8
(specifically java-1_8_0-openjdk-1.8.0.121-2.1) to run it, but I have
tried using Java 9 (specifically java-1_9_0-openjdk-9.0.0.0~155-1.1)
also. My VERSION_ID (for Tumbleweed) in /etc/os-release is
VERSION_ID=“20170211”.

Hi
No issues seen here, with Tumbleweed 20170211 and
java-1_8_0-openjdk version 1.8.0.121-2.1.

Installer starts, installed and up and running…

http://thumbnails117.imagebam.com/53232/9ecff2532313347.jpg](ImageBam)

http://thumbnails117.imagebam.com/53232/942e53532313348.jpg](ImageBam)


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.36-44-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hmm, maybe it’s my DE? I’m using KDE.

Hi
Maybe a missing java supporting package?


zypper se -i java
Loading repository data...
Reading installed packages...

S | Name                           | Summary                                                     | Type   
--+--------------------------------+-------------------------------------------------------------+--------
i | java-1_8_0-openjdk             | OpenJDK 8 Runtime Environment                               | package
i | java-1_8_0-openjdk-headless    | OpenJDK 8 Runtime Environment                               | package
i | java-1_8_0-openjdk-plugin      | Java Web Start and plugin implementation                    | package
i | javapackages-tools             | Macros and scripts for Java packaging support               | package
i | libjavascriptcoregtk-1_0-0     | JavaScript Core Engine, GTK+ Port                           | package
i | libjavascriptcoregtk-3_0-0     | JavaScript Core Engine, GTK+ Port                           | package
i | libjavascriptcoregtk-4_0-18    | JavaScript Core Engine, GTK+ Port                           | package
i | python-javapackages            | Module for handling various files for Java packaging        | package
i | timezone-java                  | Time Zone Descriptions                                      | package
i | typelib-1_0-JavaScriptCore-4_0 | JavaScript Core Engine, GTK+ Port -- Introspection bindings | package

I only use the oss, update and one other repo… maybe run zypper ve to check things out?

Don’t think so:


**$** zypper se -i java
Loading repository data...
Reading installed packages...

S | Name                           | Summary                                                     | Type    
--+--------------------------------+-------------------------------------------------------------+--------
i | java-1_8_0-openjdk             | OpenJDK 8 Runtime Environment                               | package
i | java-1_8_0-openjdk-devel       | OpenJDK 8 Development Environment                           | package
i | java-1_8_0-openjdk-headless    | OpenJDK 8 Runtime Environment                               | package
i | java-1_8_0-openjdk-plugin      | Java Web Start and plugin implementation                    | package
i | java-1_9_0-openjdk             | OpenJDK Runtime Environment                                 | package
i | java-1_9_0-openjdk-headless    | OpenJDK Runtime Environment                                 | package
i | javapackages-tools             | Macros and scripts for Java packaging support               | package
i | libjavascriptcoregtk-1_0-0     | JavaScript Core Engine, GTK+ Port                           | package
i | libjavascriptcoregtk-3_0-0     | JavaScript Core Engine, GTK+ Port                           | package
i | libjavascriptcoregtk-4_0-18    | JavaScript Core Engine, GTK+ Port                           | package
i | python-javapackages            | Module for handling various files for Java packaging        | package
i | timezone-java                  | Time Zone Descriptions                                      | package
i | typelib-1_0-JavaScriptCore-4_0 | JavaScript Core Engine, GTK+ Port -- Introspection bindings | package

On Mon 13 Feb 2017 03:26:01 AM CST, fusion809 wrote:

Don’t think so:
<snip>

Hi
Which java version are you using…?


which java
/usr/bin/java

malcolml@ernie3:~> java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (IcedTea 3.3.0) (suse-2.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.36-44-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!


**$** java -version u
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-adhoc.abuild.jdk9-688a3863c00e)
OpenJDK 64-Bit Server VM (build 9-internal+0-adhoc.abuild.jdk9-688a3863c00e, mixed mode)

I’ll be …ed uninstalling Java 9 causes the installer to run fine. The last step (where you suggested missing Java dependencies) I should have probably mentioned I did, in fact, install libjavascriptcoregtk-3_0-0 typelib-1_0-JavaScriptCore-4_0 which were not installed locally. I only showed you the output of zypper se -i java after I installed it because the installer failed to launch after I had installed these to extra packages. Thanks for fixing it!

I’ll be …ed again, Eclipse installed from my OBS project also launches fine now. libjavascriptcoregtk-3_0-0 was the crucial missing dependency (as I uninstalled typelib-1_0-JavaScriptCore-4_0 and it made no difference).

Hi
So something needs tweaking in the build to add those requires (as rpm should detect and sort out) rather than having to add a hard ‘Requires’…

I assume you do know that you can uninstall openjdk 9, you should also have been able to use update-alternatives to switch between installed versions?

update-alternatives --config java

And, by having both versions installed you could also have taken a closer look at whether specific libraries are actually missing or something else is happening… If you’re building in a Project, you may wish to anticipate future issues by understanding what you’re seeing now instead of waiting for when openjdk 9 becomes the default.

TSU

We currently don’t have Eclipse built for SUSE https://bugzilla.opensuse.org/show_bug.cgi?id=1074181 and we don’t have JavaFX in the OpenJDK package https://bugzilla.opensuse.org/show_bug.cgi?id=976102 so for now I made the best experience by downloading the Oracle Java .rpm files (sadly without repository) and use the Ooomph installer to download Eclipse.

Without looking up the references, IIRC for at least openjdk 9 and likely later openjdk 8 releases, JavaFX has been absorbed/merged into the main openjdk project, so javafx code references should “just work.”

Update to latest openjdk (8 and/or 9) to be sure you have max chances to have javafx support.
You’ll have to read the changelog if necessary to know exactly when the integration took place.

My guess is that those bugs will be cleaned up if it’s determined they don’t require addressing.

TSU