1

I installed the program Meow on Ubuntu 14.4, Gnome Shell 3.10.4 (it's a GNOME menu editor). The system updated to Java 8. When I run the program from the command line I get this:

meow
Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.medit.gui.Runner$.main(Runner.scala:15)
    at org.medit.gui.Runner.main(Runner.scala)
Caused by: java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:218)
    at org.medit.gui.Main$.<init>(Main.scala:23)
    at org.medit.gui.Main$.<clinit>(Main.scala)
    ... 2 more

Any ideas what's going on? (I have no experience in Java.)

dpkg -l '*jre*' | grep '^ii'

outputs the following

ii  default-jre-headless                        2:1.7-51                                i386         Standard Java or Java compatible Runtime (headless)
ii  openjdk-7-jre-headless:i386                 7u111-2.6.7-0ubuntu0.14.04.3            i386         OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-8-jre:i386                          8u91-b14-0ubuntu4~14.04                 i386         OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-8-jre-headless:i386                 8u91-b14-0ubuntu4~14.04                 i386         OpenJDK Java runtime, using Hotspot JIT (headless)

When I try to remove openjdk-7-jre-headless:i386it also wants to remove default-jre-headless. (Figured that might be conflicting with v8.)

===========

EDIT: Errors after making Java 8 the default (for version, it says "java version "1.8.0_111""):

Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException: key not found: abridged
    at scala.collection.MapLike$class.default(MapLike.scala:228)
    at scala.collection.AbstractMap.default(Map.scala:58)
    at scala.collection.mutable.HashMap.apply(HashMap.scala:64)
    at org.medit.core.icons.IconFinder$$anonfun$loadIcon$2.apply(IconFinder.scala:46)
    at org.medit.core.icons.IconFinder$$anonfun$loadIcon$2.apply(IconFinder.scala:36)
    at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
    at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
    at org.medit.core.icons.IconFinder$.loadIcon(IconFinder.scala:36)
    at org.medit.core.icons.ImageScaler.run(ImageScaler.scala:11)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    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:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    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)
0

Meow is failing because it's being started on the headless JRE, which can't display windows (hence the rather obscure error message).

To fix this, the easiest option is to reconfigure the default JVM:

sudo update-java-alternatives -s java-1.8.0-openjdk-amd64

You can check what the default JVM is by running

java -version

If OpenJDK 8 is correctly selected as the default, you should get something like

openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

(the version numbers might be slightly different, the important part is "1.8.0").

  • OpenJDK 8 is now the default. I can run it from the menu but it doesn't display properly, e.g., no folders and many of the icons are blacked out. I edited the answer above to show the errors I get when run from the command line. It just keeps repeating those errors. (It wouldn't fit in the comments section.) – Lee Nov 7 '16 at 18:36
  • Are you still there? Anybody? – Lee Nov 13 '16 at 18:16

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.