MEGAN6.15.2 on Linux won't open

Hello,

We just installed the MEGAN6.15.2 on Linux but it won’t open.

We have installed Oracle JRE and openjdk.

java version “12.0.1” 2019-04-16
Java™ SE Runtime Environment (build 12.0.1+12)
Java HotSpot™ 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

MEGAN fatal error:
java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
Caught:
java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
at megan.main.Megan6.main(Megan6.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:62)
Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 7 more

Thank you for your help.

1 Like

Hello, Ziyi

I have encountered the same problem. I am also waiting for the account administrator’s reply.

(1) [chanjuan@gra-login1 ~]$ sh “/project/6001625/chanjuan/MEGAN_Community_unix_6_15_2.sh”

Starting Installer …

java.lang.NoClassDefFoundError: java.awt.Component

    at javax.swing.ImageIcon$2.run(ImageIcon.java:130)

    at javax.swing.ImageIcon$2.run(ImageIcon.java:128)

    at java.security.AccessController.doPrivileged(Native Method)

    at javax.swing.ImageIcon.createNoPermsComponent(ImageIcon.java:127)

    at javax.swing.ImageIcon.access$000(ImageIcon.java:69)

    at javax.swing.ImageIcon$1.run(ImageIcon.java:103)

    at javax.swing.ImageIcon$1.run(ImageIcon.java:100)

    at java.security.AccessController.doPrivileged(Native Method)

    at javax.swing.ImageIcon.<clinit>(ImageIcon.java:100)

    at com.install4j.runtime.installer.frontend.GUIHelper.loadIcon(GUIHelper.java:191)

    at com.install4j.runtime.installer.frontend.GUIHelper.<clinit>(GUIHelper.java:50)

    at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:73)

    at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(ConsoleScreenExecutor.java:24)

    at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(InstallerConsoleScreenExecutor.java:6)

    at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:87)

    at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:56)

    at com.install4j.runtime.installer.Installer.main(Installer.java:45)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)

    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)

    at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:62)

An error occurred:

java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

(2) My account administrator told me to use:
[chanjuan@gra-login1 ~]$ module load java/1.8.0_121

[chanjuan@gra-login1 ~]$ export _JAVA_OPTIONS="-Xms256m -Xmx2g"

[chanjuan@gra-login1 ~]$ sh “/home/chanjuan/megan/MEGAN_Community_unix_6_15_2.sh”

After I use these commands, this software can be installed, but I can not use it to do anything. For example, when I import one file, the software is automatically closed.

Look forward to the help of other researchers!
Lily

Hello, Ziyi,

When I use my old account (hpc4413@login.cac.queensu.ca), this software works well. But now when I use my new account (chanjuan@graham.computecanada.ca), it doesn’t work (It presents the problem I mentioned.). I am confused.

Look forward to the help of other researchers.
Lily

This is a Java version issue.
At present, MEGAN works best with Oracle’s Java 8, which you can download here:
https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

You need to install this locally in your home directory and then set the following environment variable to tell MEGAN where to find the Java installation.

Put this in your ~/.profile file:

export INSTALL4J_JAVA_HOME_OVERRIDE= the-location-of-your-java-directory

This should work, but I will look into this in more detail.

Hi Daniel,

Where is the link to install the latest version of MEGAN on Ubuntu?

Thanks!