Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Lubuntu on a netbook and I've installed Oracle's JDK. Everything seems to work fine. The only problem is that when the Oracle JDK updates, I get the following warning:

update-binfmts: warning: current package is oracle-java7, but binary format already installed by openjdk-6

I found this link: but it seems to be talking about something specific to java-6-openjdk. When I run update-binfmts --display I get the following output:

python2.7 (enabled):
     package = python2.7
    type = magic
      offset = 0
       magic = \x03\xf3\x0d\x0a
    mask = 
 interpreter = /usr/bin/python2.7
    detector = 
jar (enabled):
     package = openjdk-6
    type = magic
      offset = 0
       magic = PK\x03\x04
    mask = 
 interpreter = /usr/bin/jexec
    detector = 

I don't understand what this has to do with Python. How can I get rid of this warning?


Ok, I know more about update-binfmts now. I can see that there are two entries in there, one for Python and one for jar. I just need to change the jar entry as per the launchpad link. I'll do that as soon as I can and mark this solved if it works.



share|improve this question
up vote 13 down vote accepted

Remove old reference:

sudo update-binfmts --package openjdk-6 --remove jar /usr/bin/jexec

Add new one:

sudo update-binfmts --package oracle-java7 --install jar /usr/bin/jexec --magic PK\x03\x04
share|improve this answer
Sorry, I didn't understand how comments and answers worked before. Your answer worked perfectly for me. – Brian.D.Myers Dec 5 '13 at 3:27
Had 1 problem w/ the command to add the new one: backslashes in magic string need to be escaped: ie PK\\x03\\x04 – Mike Lippert Apr 15 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.