DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Samuel Tang Guest

    how to close applet from appletviewer using a command


    i tried to close an applet from appletviewer using:
    System.exit(0);

    it works on win2000,
    but in unix machine it produced exception like this

    java.security.AccessControlException: access denied (java.lang.RuntimePermission
    exitVM)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at java.security.AccessController.checkPermission(AccessController.java:399)

    how can i solve this problem?
    thank you.

  2. #2
    Paul Clapham Guest

    Re: how to close applet from appletviewer using a command

    Don't use System.exit(0) to close the applet.

    PC2

    "Samuel Tang" <tong_ien@hotmail.com> wrote in message
    news:3bd6b4ec@news.devx.com...
    >
    > i tried to close an applet from appletviewer using:
    > System.exit(0);
    >
    > it works on win2000,
    > but in unix machine it produced exception like this
    >
    > java.security.AccessControlException: access denied

    (java.lang.RuntimePermission
    > exitVM)
    > at

    java.security.AccessControlContext.checkPermission(AccessControlContext.java
    :272)
    > at

    java.security.AccessController.checkPermission(AccessController.java:399)
    >
    > how can i solve this problem?
    > thank you.




  3. #3
    atlrus Guest

    Re: how to close applet from appletviewer using a command


    "Samuel Tang" <tong_ien@hotmail.com> wrote:
    >
    >i tried to close an applet from appletviewer using:
    >System.exit(0);
    >
    >it works on win2000,
    >but in unix machine it produced exception like this
    >
    >java.security.AccessControlException: access denied (java.lang.RuntimePermission
    >exitVM)
    > at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    > at java.security.AccessController.checkPermission(AccessController.java:399)
    >
    >how can i solve this problem?
    >thank you.


    hey,tang
    why don`t you try to catch that exception?and then to close it with a 'finally'?
    try that and tell me what happens.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links