NOTE: Found a workaround, I just want to know where the problem is.

Hello everyone,

I am attempting to run a java *.jar file that runs on my debian setup but cannot get to run on a fresh install of Ubuntu with openjdk-7.

Setup Ubuntu 15.10, fresh 64-bit installed default-jdk downloaded XMage.jar from xmage.de.

Using the terminal -verbose option I notice that it freezes at the following line:

[loading sun.awt.X11.XKeysym$Keysym2JavaKeycode from /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar]

After 5 minutes I killed it. I then removed default-jdk and installed Oracle Java, which was able to run the jar file.

I am unsure if the issue lies with me, the version of Java, or the jar file. Any ideas on how I can find out more information? Never debugged java before.

  • Welcome to Ask Ubuntu. It's possible to edit your question yourself to correct it, by clicking on the edit link between your question and these comments. – Martin Thornton Dec 14 '15 at 20:00

This looks to me like it was a problem with OpenJDK. rt.jar is the Java Runtime and contains all the code needed to spin up a new JVM and run your app on it. It's hanging when loading a static class related to X11, which handles graphics. You can also tell this because it's part of the AWT API, which is part of the Java SE graphics libraries.

To properly debug this, you could create a Java core dump, or use a JDK tool like jstack to dump out all the threads. These aren't trivial to search through if you're unfamiliar with the topic, though, so you might not want to go into that much depth.

  • 1
    Thanks, im not against going down the rabbit hole but was not sure where to start. This helps! – John Dec 18 '15 at 14:26
  • No problem, comment again here if you need any more guidance and I'll expand the answer. It's probably useful to others as well. – Mike Dec 18 '15 at 15:38

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.