Mixed code warning for unsigned java applet because of WMPNS.jar
I'm using unsigned applet on my website. Since java 1.6u19 mixed code warnings started to appear. This is strange, because applet is just a single jar and it's not using any external resources.
I found out that the problem is caused by WMPNS.j开发者_高级运维ar in C:\Program Files\Java\jre6\lib\applet directory. It's a signed jar from windows media player. Java is loading it together with my unsigned applet and it's causing the warning. Deleting that file solves the problem, but I cannot ask my users to remove it.
Is it possible to block loading of that jar somehow?
The log from java console when running applet from http://download.oracle.com/javase/tutorial/deployment/applet/getStarted.html:
Trace level set to 5: all ... completed.
[...]
sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1a9883d
basic: Plugin2ClassLoader.addURL parent called for file:/C:/Program%20Files/Java/jre6/lib/applet/WMPNS.jar
basic: Plugin2ClassLoader.addURL parent called for http://download.oracle.com/javase/tutorial/deployment/applet/examples/dist/applet_HelloWorld/applet_HelloWorld.jar
Is somebody else here who has WMPNS.jar in JRE\lib\applet directory too?
I've confirmed Andrew Thompson's diagnosis that this is caused by WMPNS.jar. I've reported a bug to Oracle:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7031651
but as of this writing, it hasn't appeared in the public database yet. (Really, this is Microsoft's mistake - they shouldn't have stuck a signed JAR in that location, but only Oracle has the ability to fix the problem now; and it was Oracle who changed the rules to alert mixed code when it used to not generate any dialogs.)
If it ever does appear, please vote for it!
I found out that the problem is caused by WMPNS.jar in C:\Program Files\Java\jre6\lib\applet directory. It's a signed jar from windows media player.
The applet directory in that location on this box does not contain any archives, let alone a signed archive from Microsoft.
Given MS past 'interactions' with Java/Sun, I would recommend searching the disks of your machine for malware. Note that I use FF over IE, which might be the source of the problem in this instance.
Thanks very much to the OP. This has been bugging me for ages. Unsigned java applets including my own all produced this warning, including those on Oracle's own web site. I too had a WMPNS.JAR (from 2002!) and deleting it has made those horrible mixed code warnings go away. This needs to be turned into a tip for users to apply to their own machines. I suspect MS sneaked this file into the folder somehow and some point through windwos update, and the 6.19 Java update then caused problems. Oracle should probably fix the JRE install to look for that file and kill it, because I suspect lots of XP users suffer from this.
精彩评论