Curious Message in Console

I am more curiuos than anything since my Applet seems to work fine, but when I get a successful login from my Login Applet that spawns a JRame that opens up with my control panel stuff on it. When I click on the X in my control panel to close that window I am seeing the following message appear in the console. But everything seems to work fine. Any ideas as to why this is happening, is this something that will cause me issues later on etc etc, or am I just paranoid? LOL. I am a newbie to Java so be gentle.

I have two separate Java Files that I make my class files from Login.java is my login screen and placed in an HTML file, and LoginFrame.java is the one that creates the JFrame window that I am closing that generates the message. Line 209 in the Login.java program is :

class WindowHandler extends WindowAdapter {

public void windowClosing(WindowEvent e) {

window.dispose();

System.exit(0);

}

} // This is line 209 in my listing in Macromedia MX.

Thanks,

Steven

java.security.AccessControlException: access denied

(java.lang.RuntimePermission exitVM)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkExit(Unknown Source)

at java.lang.Runtime.exit(Unknown Source)

at java.lang.System.exit(Unknown Source)

at Login$WindowHandler.windowClosing(Login.java:209)

at java.awt.Window.processWindowEvent(Unknown Source)

at javax.swing.JFrame.processWindowEvent(Unknown Source)

at java.awt.Window.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

[2386 byte] By [OurDreamWeba] at [2007-9-28 2:08:30]
# 1

My reply should be prefaced by saying that I am certainly no expert on applets.

That being said, what's happening is that that System.exit(0) line is trying to exit the entire JVM. However, I don't believe an unsigned applet has the permissions to do this. The reason everything is still working fine is that you dispose() the window on the line above, which gets rid of the window for your applet. The window goes away, and then you get a security exception when you try to exit the JVM. You aren't allowed to do this, so Java happily reports that to you, but it never really causes you any real "problems".

I'd just get rid of the System.exit() call. The JVM should exit itself, and even if you could get an applet to let you exit the JVM, you really don't want your programs possibly closing the JVM while other programs could be using it.

qeldromaa at 2007-7-7 21:41:09 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

Thanks for the response that does make sense. I will remove the exit statement and let it play in test for a while and see what happens. I can only assume that our admins will require it to be signed somehow before I can push to production. But hey, either way your point makes sense.

Thanks,

Steven

> My reply should be prefaced by saying that I am

> certainly no expert on applets.

Are any of us experts with a new Jsomething coming out everyweek. I was doing a search for the AgXML spec to start reviewing for implementation in areas where I am at and found this listing of what appears to be a bunch of XML schemas out there in some for for various things. Chess-XML(?) do we really need a international standard for chess? LOL. Check out this link - http://xml.coverpages.org/xmlApplications.html

> you really don't want

> your programs possibly closing the JVM while other

> programs could be using it.

But what about my King of the world theory. LOL.

thanks again for the input.

Steven

OurDreamWeba at 2007-7-7 21:41:09 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...