Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can applets create threads?

 
Eduard Manas
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a question from a mock exam:
A malicious applet has been developed to slow a machine down by calculating square roots of huge numbers (thus using plenty of CPU) and by creating a new thread every few seconds. Will this applet work or should the Java security manager stop it? (assuming a strict java security policy)

Surprise surprise the correct answer is the applet will work!
Whereas I knew the security.policy file cannot limit the CPU resources the applet uses, I would have thought that it can limit thread creation. I am pretty sure the security.policy can avoid an applet creating processes, but not that sure about threads.
Any suggestions?
Thanks
 
Ricardo Polero Baraldi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the applets can create a threads !
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is thought to be an annoyance as opposed to a serious security problem. If you closed your applet viewer the problem goes away. On the otherhand the ability to run animations, downloads, calculations and keep a UI going at the same time is a nice feature.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic