Hi there, thanks for your replay and detailed instructions.

I attempted the steps you listed, and it did work with the basic file.

However, when I tried to replicate a more complex example with UI (wcss/tutorial14), compiling the java files did work, but attempting to execute resulted in errors relating to classes not being found in linked libraries (terminal screenshot attached)

I also spent a long time attempting to get Eclipse functional. There are only 2 guides I was able to find, both very old


The second one did not seem to handle including necessary libraries such as j3d and jmf, so I spent most of my time on the approach detailed in the first link.

After much time spent figuring out how to include the necessary libraries in the build path, I was finally able to get to a point where I could run the mason project as a Java application, and even was able to see a screen with the full list of available models, yet when trying to launch one of these models, I immediately receive a few errors that I cannot figure out the solution to (attached).

I am unable to proceed past this point.

Any additional help you may be able to offer is extremely appreciated.

Thank you again for your help,


From: MASON Multiagent Simulation Toolkit <[log in to unmask]> on behalf of Ernesto Carrella <[log in to unmask]>
Sent: Friday, January 18, 2019 11:53:49 PM
To: [log in to unmask]
Subject: Re: Compiling Issue

Hello there

the immediate fix here is the following. Create a directory that contains both the mason jar file and the Students example. It should look like this:

Where is the basic run

import sim.engine.*;
public class Students extends SimState
  public Students(long seed)
  public static void main(String[] args)
      doLoop(Students.class, args);

In terminal, within the directory ("testing_mason" in my machine) call the following:

> javac -cp "mason.19.jar:."

where javac is the compiler call, -cp (classpath) tells mason where to look for libraries and you can use ":" to add multiple paths (; in windows) and is your code. This will generate a class file:
Which you can run by calling

java -cp "mason.19.jar:." Students

notice that now we are calling java (without c) and we are pointing to the class name "Students" not any specific file.
This will run.

However, and I can't stress this enough, this is not how anybody uses MASON(or Java, since the late 90s). This is a tremendous pain for very little gain. Dealing with classpaths is not a useful skill, mucking with -cp flags or environmental variables teaches you nothing and wastes a lot of your time.
Get started immediately on an IDE and do all the examples through it. There used to be a lot of eclipse+MASON guides around, so find one that works for you and do that.
They will take care of all these chores and outside of very lateral cases you will not be bothered by the java machinery at all and you can focus on building and modelling.

On Fri, Jan 18, 2019 at 10:43 PM Jennifer Longo <[log in to unmask]<mailto:[log in to unmask]>> wrote:

My apologies for the delayed response. Here is a screenshot of my path:[cid:16864d28d519c10f08d1]What I'm finding to be strange is that I've had it working before. Nothing has changed with the tutorial code or my own code (the unm directory two spots above wcss). I've had to do some run around in order to get the code running, I took direction from here:<> and yet now no matter what I do, the sim.engine is just not being recognized. I really appreciate you all getting back to me.

Thank you,


From: MASON Multiagent Simulation Toolkit <[log in to unmask]<mailto:[log in to unmask]>> on behalf of Peter Gacs <[log in to unmask]<mailto:[log in to unmask]>>
Sent: Wednesday, January 16, 2019 2:15:34 PM
To: [log in to unmask]<mailto:[log in to unmask]>
Subject: Re: Compiling Issue

Currently I am using MASON via the IntelliJ IDE.  There, you can specify a dependency in the Project Structure screen, telling the IDE where it finds the jar files or libraries it needs for compilation.

Peter Gacs

> On Jan 16, 2019, at 14:28 , Jennifer Longo <[log in to unmask]<mailto:[log in to unmask]>> wrote:
> Hello,
> I am relatively new working with MASON and am having issues compiling your tutorial code. Using traditional Java methods are yielding an error message of the sim engine not being found. All packages are placed in the correct directories. I have searched and noticed others having similar issues with bio posted solutions that work. Any help would be greatly appreciated.
> Best,
> Jennifer

Ernesto Carrella<>