How to resolve update-binfmts: warning: current package is oracle-java8, but binary format already installed by openjdk-7

I earlier had Oracle Java 7 installed on my Linux box. I upgraded to Oracle Java 8 as follows (below commands to be typed in a terminal window):
$ sudo apt-get purge oracle-java7-installer <enter>
$ sudo apt-get install oracle-java8-installer <enter>

However, when Oracle Java 8 was downloaded and installed, I saw a message like this:
update-binfmts: warning: current package is oracle-java8, but binary format already installed by openjdk-7

Appears there is some issue in the update-binfmts and it could be listed using:
$ update-binfmts --display <enter>

You will see that the entry shows openjdk-7. To change it and overcome the error message, do the following:
$ sudo update-binfmts --package openjdk-7 --remove jar /usr/bin/jexec <enter>
$ sudo update-binfmts --package oracle-java8 --install jar /usr/bin/jexec --magic PK\x03\x04 <enter>

That’s all and it should now be okay.

Leave a Reply

  

  

  

Blue Captcha Image
Refresh

*

September 2019
M T W T F S S
« Aug    
 1
2345678
9101112131415
16171819202122
23242526272829
30