dcsimg
applet-thread-exception
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ivo_Rahov
Posted On:   Friday, June 2, 2006 03:42 AM

I’ve made an applet using threads in it: class MyApplet extends JApplet { Private void m_TreeMouseClicked(java.awt.event.MouseEvent evt){ try{ new MyThread().start(); }catch(Exception e) ... class MyThread extends Thread{ public void run(){} } } But any time when I try to debug I get exception: e.getClass.getName(): java.security.AccessControlException e.getMessage(): access denied (java.lang.RuntimePermission modify ThreadGroup) I have no problem to build it. When I start it in the browser (IE or Firefox) – no problems. But I need to be able to debug in the NetBeans IDE.   More>>

I’ve made an applet using threads in it:

			
class MyApplet extends JApplet
{
Private void m_TreeMouseClicked(java.awt.event.MouseEvent evt){
try{
new MyThread().start();
}catch(Exception e)
...

class MyThread extends Thread{
public void run(){}
}
}


But any time when I try to debug I get exception:

e.getClass.getName(): java.security.AccessControlException

e.getMessage(): access denied (java.lang.RuntimePermission modify ThreadGroup)


I have no problem to build it. When I start it in the browser (IE or Firefox) – no problems.

But I need to be able to debug in the NetBeans IDE.
I’ll appreciate any help...

   <<Less

Re: applet-thread-exception

Posted By:   Ivo_Rahov  
Posted On:   Friday, June 2, 2006 04:06 AM

Thanks God I found it. It is simple but it took much time for a begginer like me


in file java.policy add:

permission java.lang.RuntimePermission "modifyThread";

About | Sitemap | Contact