April 2022


Options: Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Fri, 29 Apr 2022 07:34:54 -0400
text/plain (1719 bytes) , text/html (4 kB)
The Console class grabs a couple of images, such as the play, stop, and pause icons, when it is fired up.  These icons are ultimately stored right next to the Console.class file.  Console looks them up like this:


If the image is missing, then this expression will return null and you'll get this error I'm guessing.

What might be the cause?  Probably a build error.  Due to Maven (ugh) MASON presently has all of its resources, including the images, stored in a different directory than its java files.  When you build MASON it needs to merge them the image directory with its class directory so they're located in the right spot.  If you build using the Makefile it'll do this right: if you build using Maven it'll also do it right.

That's all I've got: hopefully this will be enough of a clue.


> On Apr 28, 2022, at 11:20 PM, Jonathan M West <[log in to unmask]> wrote:
> I keep getting this error message for as implemented in the manual
> Exception in thread "main" java.lang.ExceptionInInitializerError
>               at myMasonTest.StudentsWithUI.main(
> Caused by: java.lang.NullPointerException: Cannot invoke "" because "location" is null
>               at java.desktop/javax.swing.ImageIcon.<init>(
>               at sim.display.Console.iconFor(
>               at sim.display.Console.<clinit>(
>               ... 1 more
> I’ve searched all over for a solution to this and haven’t found one in the listserv, it is obviously a configuration problem but I do not know what is incorrectly configured
> Jon West