7

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: https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/328174 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?

EDIT:

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.

Thanx,

Brian

1

1 Answer 1

17

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
2
  • Sorry, I didn't understand how comments and answers worked before. Your answer worked perfectly for me. Dec 5, 2013 at 3:27
  • 2
    Had 1 problem w/ the command to add the new one: backslashes in magic string need to be escaped: ie PK\\x03\\x04 Apr 15, 2016 at 17:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .