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 Students.java 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:." Students.java
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 Students.java 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]> wrote:

My apologies for the delayed response. Here is a screenshot of my path: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: https://bbs.archlinux.org/viewtopic.php?id=220386 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]> on behalf of Peter Gacs <[log in to unmask]>
Sent: Wednesday, January 16, 2019 2:15:34 PM
To: [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]> 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