Problems with http://java.sun.com/security/signExample/index

Michael Minnick (mminnick@us.ibm.com)
Wed, 6 Aug 1997 16:32:51 -0400

From: Michael Minnick <mminnick@us.ibm.com>
To: <java-security@web2.javasoft.com>
Subject: Problems with http://java.sun.com/security/signExample/index
Message-Id: <5040300003912064000002L042*@MHS>
Date: Wed, 6 Aug 1997 16:32:51 -0400

I have two problems with the signed applet example at
http://java.sun.com/security/signExample/index.html.

1. The following html code is meant to display as-is, but instead actually
causes the applet to be loaded and run on at least the following browsers: IE 3
for Win95, Netscape Navigator 3 for Win95 and OS/2, HotJava on OS/2:

<pre>
<applet code=writeFile.class archive="signedWriteFile.jar" width=500 height=50>
</applet>
</pre>

2. The java code in writeFile.java tries to make a DOS-style file name if it
detects it is on a non-Unix system. It does this by looking for the string
"Windows" in the os.name property with the following code:

String osname = System.getProperty("os.name");
if (osname.indexOf("Windows") != -1) {
myFile="tmpfoo";

This doesn't work on OS/2. It would probably be better to look at
file.separator, or better yet just make a file "tmpfoo" in the current
directory no matter what OS you are on.

Thanks,
Mike

Internet: mminnick@us.ibm.com
Notes: Michael Minnick/Austin/IBM
VM: mminnick at bcrvm1
T/L: 678-9913 (512-838-9913)
http://rudolph.austin.ibm.com/