MASON-INTEREST-L Archives

May 2010

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 3 May 2010 19:41:00 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
Well, another option is to create a "special" Display2D situation  
which doesn't create a window, and use a SimpleController instead of a
Console. Lemme mull it over.

Sean

On May 3, 2010, at 4:47 PM, Mark Coletti wrote:

> On Mon, May 3, 2010 at 1:22 PM, Sean Luke <[log in to unmask]> wrote:
> It's theoretically possible but would require some hacking.
>
> I'd start by running headless.
> http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/
>
>
> This does not work:
>
> Exception in thread "main" java.awt.HeadlessException
> at
> java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:
> 159)
> at java.awt.Window.<init>(Window.java:431)
> at java.awt.Frame.<init>(Frame.java:403)
> at javax.swing.JFrame.<init>(JFrame.java:202)
> at sim.display.Console.<init>(Console.java:236)
> at
> gmu
> .krasnow
> .jieddo
> .af.district.AfPopDistrictWithoutUI.main(AfPopDistrictWithoutUI.java:
> 171)
>
>
> This is not surprising given the number of "headless hostile"
> components in Display2D. On the other hand, I might be able to do
> some more hacking on the code to make this work. I'll keep you
> posted on my progress.
>
> In any case, maybe during next MASON refactoring you should consider
> splitting out the "headless friendly" functionality into a Display2D
> superclass; say, VirtualDisplay2D. That way one can fire up a
> VirtualDisplay2D that does not have all the GUI accoutrements that
> won't be used anyway and the be able to safely invoke "headless mode."
>
> Cheers,
>
> Mark

ATOM RSS1 RSS2