Hi, On Windows XP I have 3 browsers: FireFox, Mozilla and IE7. I have had several versions of the java jre installed. The registry currently has 4 versions referenced in the JavaSoft/Java Plug-in and 7 versions in Java Runtime Environment. The JRE CurrentVersion is 1.5. When looking at an HTML page with an applet FireFox uses JRE 1.6.0, Mozilla and IE7 use 1.5.0. I have an applet that requires an entry in the .java.policy file to enable it to read files. When I use FireFox and Mozilla, the applet works. When I use IE7 I get access denied needing FilePermission read.
What determines which jre a browser uses? How does applet security differ between IE7 and the other 2 browsers?
Thanks, Norm
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
In general, there's a control panel called "Java Plugin" (or some such) that lets you pick which JRE to use. I don't think there could be more than one Java Plugin control panel; might be something to check on your machine.
Thanks for the response. There is a javacpl.cpl file with each version in it's bin folder. The .cpl file needs an entry in the registry's to execute. The currently installed versions .cpl file in in a Windows folder and is accessible in the Control Panel.
When I look at the Advanced tab, the <APPLET tag support has IE checked and Mozilla and Netscape NOT checked.
IE and Moz use 1.5. FF uses 1.6 How is that?
Norm Radder
Ranch Hand
Joined: Aug 10, 2005
Posts: 681
posted
0
New observation on IE7 and .java.policy file. An applet executed in IE7 with the following policy file entry is allowed to write a file:
grant codeBase "file:/D:/JavaDevelopment/Testing/WriteFile/-" { permission java.io.FilePermission "D:/Testing/writetest.txt", "read, write"; };
It fails if I change the target file to a wild card of - or * : grant codeBase "file:/D:/JavaDevelopment/Testing/WriteFile/-" { permission java.io.FilePermission "D:/Testing/-", "read, write"; };
Other browsers work with the wildcard characters.
Norm Radder
Ranch Hand
Joined: Aug 10, 2005
Posts: 681
posted
0
I gave up on this for a while. It went away for a while when I updated the jre and then came back with the latest jre (6_U13). So I spent a day and found a workaround.
If I add permissions under the empty codeBase (<ALL>) it works, ie the program is able to read the files in the folders.
The codeBase <ALL> entry from my .java.policy file: