I just ran into this issue with a self-compiled jar file and confirmed that I have the same issue with ditaa on Debian. Checking the binfmt_misc configuration may be useful. To see what interpreters will be tried by binfmt_misc, run `/usr/sbin/update-binfmts --find /usr/bin/ditaa`. Then try running the interpreter with the jar file directly (e.g. `/usr/bin/jarwrapper /usr/bin/ditaa`) to see if it works.
If update-binfmts does not print anything, that suggests either corruption of the JAR file (check `od -An -tx1 -N4 /usr/share/ditaa/ditaa.jar` is `50 4b 03 04`) or that jarwrapper is not correctly registered (check `/usr/sbin/update-binfmts --display jarwrapper` prints `jarwrapper (enabled)`). If update-binfmts prints `/usr/bin/jexec` (or anything else) in addition to `jarwrapper` and those interpreters do not work, this suggests conflicting binfmt_misc registrations. Check the output of `/usr/sbin /update-binfmts --display` to find out which package installed it. You can then remove it by running something like `sudo update-binfmts --package openjdk-8 --remove jar /usr/bin/jexec`. The issue, as it appeared on my system, was that the openjdk packages (e.g. openjdk-8-jre-headless) install /usr/bin/jexec as a binfmt_misc handler but jexec doesn't work with this jar. Java version mismatch perhaps? I found the issue of jexec/jarwrapper conflict has been raised before at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136993#82 without response. Perhaps it's time to raise it again? I'd reassign this bug to openjdk-8-jre-headless. ** Bug watch added: Debian Bug tracker #136993 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136993 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1498832 Title: invalid file (bad magic number): Exec format error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ditaa/+bug/1498832/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs