Java Console: Close on Exit?

Discussion of initiative tool.

Moderators: dorpond, Azhrei

Post Reply
dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Java Console: Close on Exit?

Post by dorpond »

Hey Jay,

Why is it that the Java console doesn't close on InitTool Exit like Maptool does? Do you prefer it that way so that you can remember to copy the error logs in there?
I just always notice that I have to manually close it at the end of game.

Just curious.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Are you running the webstart version?

I run the zip file version and I never see the console.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

Perhaps it's a "Dispose on close" instead of an "Exit on close" ?
Dreaming of a 1.3 release

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Post by dorpond »

Phergus wrote:Are you running the webstart version?

I run the zip file version and I never see the console.
Yeah and I have Java (in control panel) set to display the console when a Java app runs.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

I'm not sure what that is happening. It wasn't anything that I did (on purpose :-). Webstart probably isn't exiting like it is supposed to when all of the windows have been closed. It does exit completely when I run it local. I've changed a lot of the menu code in the next build, I'll take a look at it after that is released since I can't test it w/o webstart.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Post by trevor »

If you change InitToolFrame:241 from

setDefaultCloseOperation(DISPOSE_ON_CLOSE);

to:

setDefaultCloseOperation(EXIT_ON_CLOSE);

You'll get the expected behavior. Unless you intended to not kill the app on close.

DISPOSE shouldn't kill the underlying java vm, since there's always the EDT running.
Dreaming of a 1.3 release

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

The problem with switching it to exit on close instead of dispose on close is that it will kill the JVM even though the group frame is open. Since the group frame has it's own menu I didn't think it should close when init tool did. If I can't fix it so it works this way, I'll change it so that it does the exit. The weird thing is that it exits correctly when you don't run it in webstart.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

This is fixed in build 12.

Post Reply

Return to “InitiativeTool”