2

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.jar 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?

MarcinLe
  • 110
  • 1
  • 7
  • 1
    This sounds strange. I have JD1.6.20 and this does not happen with hello world applet http://download.oracle.com/javase/tutorial/deployment/applet/getStarted.html. Try this first. If hello world applet does not cause this warning I believe that your applet somehow causes loading WMPNS.jar. In this case try to move from hello applet to your applet by adding code step-by-step until the warning suddenly appears. This will probably help to locate the problem and fix it. – AlexR Feb 08 '11 at 10:26
  • Well, I have those warnings also with Oracle applets: [link](http://i.imgur.com/2T4dd.png). I have JRE 1.6.0_22-b04 and Windows XP. – MarcinLe Feb 08 '11 at 10:36

3 Answers3

1

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!

Joshua Smith
  • 3,689
  • 4
  • 32
  • 45
0

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.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • I don't think WMPNS.jar is a malware. [Looks like](http://support.microsoft.com/kb/817855) it's from Microsoft. I suspect it was installed during Windows Media Player update or by Automatic Updates in Windows. So, it's not possible to do anything for those poor souls with wmpns.jar except suggesting to delete it? – MarcinLe Feb 08 '11 at 20:28
0

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.