• Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet security problem

Xander Uiterlinden
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I wrote an applet which listens for UDP messages and which sends UDP messages as well. I signed the applet in order to make it work when downloaded from a web server.
The applet lauches 2 threads:
- a thread for listening for datagram messages
- a thread which functions as a heartbeat by sending datagram messages

The problem is that the thread which functions as a heartbeat seems to be the only one which is allowed to use sockets. When I try to call a function on the Applet's thread which should send a message I get an error:

>Error: access denied (java.net.SocketPermission >connect,resolve)

>java.security.AccessControlException: access denied (java.net.SocketPermission connect,resolve)

Which is strange because the other thread is allowed to do the exact same thing.

The applet runs on java 1.2.4_02.

To me it appears the 'heartbeat' thread obtained privileged access to the SocketPermission, but I can't find out why.

Anyone ?


What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!