NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Applet View Problems -java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
trellend



Joined: 26 Apr 2010
Posts: 4

PostPosted: Mon Apr 26, 2010 5:06 pm    Post subject: Applet View Problems -java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup) Reply with quote

I have a relatively large Applet that runs in the browser, but just recently won't run in applet viewer. (In fact nothing will run, even simple blank applets).

NB 6.8, Jdk 6 U 20, Win XP 2 gig ram.

Error:

java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at sun.applet.AppletSecurity.checkAccess(AppletSecurity.java:235)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
at java.lang.Thread.init(Thread.java:332)
at java.lang.Thread.<init>(Thread.java:391)
at RTSphere.init(RTSphere.java:42)
at sun.applet.AppletPanel.run(AppletPanel.java:424)
at java.lang.Thread.run(Thread.java:619)

Everything used to work fine, then when I got update 20 (around there), not even the simplest applets will run in the viewer. Please help!
Back to top
trellend



Joined: 26 Apr 2010
Posts: 4

PostPosted: Mon Apr 26, 2010 5:09 pm    Post subject: Here is a simple applet that makes that same error Reply with quote

Code:
import java.applet.Applet;

public class AppletGameCore extends Applet implements Runnable {

    private boolean stopped = false
    public void init() {
        Thread t = new Thread(this);
        t.start();
    }

    public void main() {
    }

    @Override
    public void run() {
        while (!stopped) {
            try {
                Thread.sleep(20);
            } catch (InterruptedException ex) {
            }
        }
    }
}
[/code]
Back to top
trellend



Joined: 26 Apr 2010
Posts: 4

PostPosted: Mon Apr 26, 2010 5:30 pm    Post subject: Hmm Reply with quote

Somehow:

-Djava.security.policy=applet.policy

Got inserted into my VM options on build. Very odd.
(Properties->Run->VM Options)

Removed it and now it's back to normal...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo