In my laptop, I have openjdk1.6, openjdk-1.7, and openjdk1.8 installed. I can see all of them through update-alternative --config java.
$update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
3 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
I also have openjdk-7-plugin installed. But I don't know why my firefox always shows that my latest java version is
application/x-java-bean;jpi-version=1.7.0_50
I already tried to Re-initializing the plugins database, but it doesn't work. How can I see my latest java in the browser plugin? I can see my newest java version through the oracle java version verify page.
update:
I installed the icedtea-8-plugin then removed the icedtea-7-plugin. However, the about:plugins shows that my java version is application/x-java-bean;jpi-version=1.6.0_50. The plugin path is correctly pointed to
Path: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
The oracle java version verify page can correctly show my java version is 1.8.0_45-internal. Does anyone have idea on how firefox discovery the java version on my laptop?
Update2:
Thanks @TrevorL for you detailed answer.
Now I removed all the openjdk-* packages in my system. The only thing I install is openjdk-8-jre and icedtea-8-plugin.
I confirmed all the executable and configs are located in /usr/lib/jvm/java-8-openjdk-amd64/. The mozilla-plugins.so points to /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so. The itweb-settings is also pointed to correct version.
I do see firefox using the correct IcedTeaPlugin.so in the about:plugins. Since I only have 1 version jvm installed in my system now. I think the question should be modify to: why IcedTeaPlugin.so in icedtea-8-plugin report java 1.6.0_50 in Firefox?