0

What does this means?

I am trying to install quickumls and I am getting this error when installing UMLS in a Databricks single cluster using the web terminal.

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
        at java.awt.Window.initGC(Window.java:475)
        at java.awt.Window.init(Window.java:495)
        at java.awt.Window.<init>(Window.java:537)
        at java.awt.Frame.<init>(Frame.java:420)
        at java.awt.Frame.<init>(Frame.java:385)
        at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1763)
        at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
        at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696)
        at org.java.plugin.boot.ErrorDialog.showError(Unknown Source)
        at org.java.plugin.boot.ErrorDialog.showError(Unknown Source)
        at org.java.plugin.boot.BootErrorHandlerGui.handleFatalError(Unknown Source)
        at org.java.plugin.boot.Boot.main(Unknown Source)

The error I got prior to that was the following: I had set the DISPLAY VARIABLE TO 0.0 export DISPLAY=:0.0 but I honestly don't know what to put there.

No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
    at java.awt.Window.<init>(Window.java:536)
    at java.awt.Frame.<init>(Frame.java:420)
    at java.awt.Frame.<init>(Frame.java:385)
    at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1763)
    at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
    at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696)
    at javax.swing.JOptionPane.getWindowForComponent(JOptionPane.java:1637)
    at javax.swing.JOptionPane.createDialog(JOptionPane.java:956)
    at javax.swing.JOptionPane.createDialog(JOptionPane.java:918)
    at gov.nih.nlm.umls.swing.SwingToolkit$1.run(SwingToolkit.java:255)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I just tried adding the -Djava.awt.headless=true to the run_linux.sh file and got another error java.awt.HeadlessException

CLASSPATH=".:lib/jpf-boot.jar"
export CLASSPATH

$JAVA_HOME/bin/java  \
 -Dfile.encoding=UTF-8 -Xms1000M -Xmx2000M -client \
 -Dscript_type=.sh \
 -Dunzip.native=true -Dunzip.path=/usr/bin/unzip \
 -Djava.awt.headless=true \
 org.java.plugin.boot.Boot
Samlex
  • 161
  • 3
  • 8
  • I read that I should set `java.awt.headless=true` but that is not working either, but I cannot find any clear documentation on how to do it. If someone can point me in the right direction. That would be helpful. – Samlex Aug 04 '22 at 17:28
  • 1
    I think the way you are setting the `DISPLAY` environment variable is wrong. Perhaps this will help? ["No X11 DISPLAY variable" - what does it mean?](https://stackoverflow.com/questions/662421/no-x11-display-variable-what-does-it-mean) – Abra Aug 05 '22 at 16:09
  • I tried setting it to 0.0 `export DISPLAY=:0.0` but I get a `java.lang.NoClassDefFoundError`. It seems that it is missing the class sun.awt.X11GraphicsEnvironment in the java.lang.* package. – Samlex Aug 05 '22 at 18:56

0 Answers0