-
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.
-
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.
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks