Same plugin, two browsers, security exception in one of them

Hi all. Hopefully someone can answer this.

I have a signed applet, that needs to open connections to other hosts.

If I load applet in Firefox, it works.

If I load applet in IE, it throws security exception.

Java plugin is 1.5.0_06 in both cases.

So why different behavior?

Thanks, Miha Vitorovic

[338 byte] By [Miha.Vitorovica] at [2007-10-2 21:45:41]
# 1

Well, speaking very generally, a security exception means the code tried to do something that wasn't allowed. So my guess would be that Internet Explorer is set (perhaps by default?) to not allow whatever the code is doing. For a more specific reply, you'd need to post your code. (Don't forget the code formatting button!)

Dick_Adamsa at 2007-7-14 1:01:15 > top of Java-index,Java Essentials,Java Programming...
# 2

Thanks for the answer.

Where does one set these security restrictions? I thought that securityy model is imposed by the JVM sandbox, which (I thought) behaves the same in both browsers. And I just went through all the security settings in IE, but could not find anything. Java Control Panel also didn't help.

What I'm trying to do is connect to an arbitrary host, and the exception I get is

access denied (java.net.SocketPermission obelix.nil.si resolve)

of course.

So again, what does one have to do, to get Java plugin to allow this in IE?

Thanks, Miha Vitorovic

Miha.Vitorovica at 2007-7-14 1:01:15 > top of Java-index,Java Essentials,Java Programming...
# 3

Well, after some more digging arond (my computer), I discovered that some time ago I created a security policy file allowing "resolve" and "connect" actions to my applets. So it seems the only problem was that while Java with Firefox honors the security policy file, IE with Java plugin does not.

After clearing the policy file, both browsers refuse to connect (well, at least I got consistent behavior). Now if only I could make the #!!$%?!! applet connect to other machines as it is supposed to...

Any ideas?

First thing I'll do is create a whole new key, and see if that helps.

Regards, Miha Vitorovic

Miha.Vitorovica at 2007-7-14 1:01:15 > top of Java-index,Java Essentials,Java Programming...