Print

Print


You are right, those tutorials are old.

I wrote a new one for intelliJ (which is what I use); see if this makes
sense

http://secure-web.cisco.com/1G35GCeJvh2Tyj6jkNoIsUHw9KHbcCzMuKGFTubsFX5fZW01deEkDfLRMGILWbDfzu5uOwMennpPYhyv7sQ9Tbq2ZMOfygTx8i9ogNNAE76L1ku_V77Jpse3HMyW5kx0NkxK_EmCPgYeNmDe2vpPjfrivrKwmGPsBGY9j6T78kMhcWFKiEqORCylyOMJ9IynfcNUZlNef8TZJdku8K_1h2MYj3yHFp2RKlVBpVKXpdxtXODKprjul5DD6IkXlsEA6ayhs9BwhZJ83ZL2H0Pv535HCCaSrPQ2gZd5RCaOjn-B71sDLWeOpgkahMTKRE6fIUw67iX2FyxhDsf9jpH1BEF3RyE2kQENYnL62nJxU51a6wGj0KCuUOLdyG2Q8RIFInQrQccrsiwyE3W6ZwpoemP4aDT52OuSvJ_FQUzwNxBCWJyf4oICdZ8-7pvOQ61x7jE2eY4c5VYEzP9-w1saK8Q/http%3A%2F%2Fcarrknight.github.io%2Fabm%2Fmason%2F2019%2F01%2F22%2Fintellij-mason.html


On Tue, Jan 22, 2019 at 2:50 AM Jennifer Longo <[log in to unmask]> wrote:

> Hi there, thanks for your replay and detailed instructions.
>
>
> I attempted the steps you listed, and it did work with the basic
> Student.java 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
>
>
>    1. https://cs.gmu.edu/~eclab/projects/mason/extensions/eclipse/
>    2. https://secure-web.cisco.com/1bkujbkSWFOJThcpbtJiwvGLF9fYzuzOiQfnZ0fEugxWY17RT_oCye2wrr696Dk0tP5LrZ29aP-SKo3lY-kDjnAKmpszHihmrIvVLVjj9DudeheYgcKq1dg37h1IKjUlDNF70v8sWYi1SXp8MiUPegNXQaIh-ar7gfviRwQ3U8uRUrYBuL70_fRuFJihECbTFiJi7bHKFEgRxlGBAVQVt0i81fHRzZvW-41QacNE75FBQ8OS4efInaDq7ffcB7SEjZA19D0vM8NxhZuSZZZPKRk-2gLtTmVD3aJEl3MfoXPO0JkMyjD2SUjlstwX-IRXdPO12Tz7cM-8POtFHGImjGcLUQCMqmvev2Q9DnAY6oO6vYGOJG3fFdqyPxCWEyRCSCVLWhxP8Km9XQhW1NFnfr3H6GFlwEaok2kSSsPaOARZQ4mqDPSpdunS4Sa-fIKgXcbp_do4APVr9Sp0xsdhIuQ/https%3A%2F%2Fdocplayer.net%2F61592708-How-to-set-up-mason-in-eclipse.html
>    <https://secure-web.cisco.com/1jfbrISnBAMKipPLbJys91O6OY4derfhc3AzcFa4B8pc5RFxrtX6OBxA0lH5uyvu7O5LeOhYsnOMmIMBff_PWkiEO4sEYXrgZtzqkCI6_9PEZMk-MV-HGiLdOppEJ3qxorQq1oaMy9PHkWIn4TWpHLcHFFg4LAXkbVkkaevDv3v_VW8xszO4OpbsV7g3tzvhiawM3p_eyTVZX1xaHqKhRtXShZW2PeDOu-o7aH6TDMpt0YAxexkzbQZW3PiYLvpHDnvyDSv4E7z2Eh9ZjEhDN7KYRu30OvzK2BF3xrl-H9g9j4UYLZ4cULKoAf4T8zUX-7q4SRvBQ0eY_aCYdgvEkXB_-2QeMOIC11yaKCffVcHkLFvf_ayhfFZC5Yv_1KdmoGnDzBuPtT6ixDGLprYBtKKmJ9RCGTNFOT5tNnoOjRQef69vxiPzlgz2TzNYE5hOuENs0jV-tRftw6laMqGZy0g/https%3A%2F%2Fdocplayer.net%2F61592708-How-to-set-up-mason-in-eclipse.html>
>
> 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,
>
> Jennifer
>
>
>
> ------------------------------
> *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:
>
> [image: image.png]
> Where Students.java is the basic run
>
> import sim.engine.*;public class Students extends SimState{
>   public Students(long seed)
>     {
>       super(seed);
>     }
>   public static void main(String[] args)
>     {
>       doLoop(Students.class, args);
>       System.exit(0);
>     }}
>
>
> 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:
> [image: image.png]
> 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://secure-web.cisco.com/1s4Icy99XCKU3ub2lvy2_zD9xXvsE3sDYhGACdZMtfA2kJNSdB62P82funznT3NO-W3QxmHFFQzb5fS_y9-5XALoKyElvBKEmJG9V7diZjgTRwV_gYWt62BUpZpligvOkKgvScxD0xRVi2BN4X7IcwMyswN0OYTB7-abYfd_AKO4hhHSyCQE7tRb-GyLTt7eMOirAavhJuZvy1K2ODGhRX7NyLcIRTc9edAcAE0mAbel285WmzXm-Pl2EJD772BD9Yg51kLLmqkjdFWY8ug57EPtmgW0J46S-cQzrXkSAgiKO54bocaW7wyx9jDDmk__t-lcvadrWGHnDhMNkSZdqhA8mm_0k_otCPMIW2X-r8ZAFEERZkdensgAGZq_D5-aSU1QmPWdstKlNhrYo1ylfBU68lpK3wVS-HPjFWmmmENYz-w4fMZCvr4yDqZU7xNVXLqcICxjRAWowggzUIRjL4w/https%3A%2F%2Fbbs.archlinux.org%2Fviewtopic.php%3Fid%3D220386
> <https://secure-web.cisco.com/16-7E8vG0VqPDMBIv4r94JeGpIJY-rWeGop-KEqGkcUa8Iqyr40Da_YQfUvOniXyZbSCBmJ-d3kzirOJ_SuaH2ufL7Isii9-bkHIZLTmdSyqxMJiuT9MHjNa9e8xscKbU-E02G6NVEakifurOCr-XGaQp5tY6cVdsuqxSA83YXIpLjoVSp0sum4wTf0y__8x33YmGBjXw8cEVuTOHuMCFCMO-CKMZ3KJW3mS80obAtrjfEU2fxA55U9c1rmUcXgzRZqgEOpAcEBHbfvVZ5I8T-zA2Nt6GJ6Ud29ovZP5Bbs3BFxKdOvqeOs9oQQAY5r3HXTrsd3cBmYkIWGnL1shXOgLzTElwvwjmsimqVzuoUqMfAvqo5G2PCh8cSeI9acQuy87-uXNzlNVW44Oxn_0JPLxUWyb3kKzoI1xbxkN5uqpJH7vgQhJ_o4W9mb677XVBSoh2HKOc0JitVivxmhbYmw/https%3A%2F%2Fbbs.archlinux.org%2Fviewtopic.php%3Fid%3D220386> 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,
>
> Jennifer
>
> ------------------------------
> *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
> http://secure-web.cisco.com/1U82Cfw1pwX4LE2X3daRsDfAw7gVtDg7IN79jzQbn_hvl7Ef6j6XDjwvQdyT-cuXO3NHP3gTheZyVHWQ85y6tthGmWHLdwXJXhA0dEDgwQro5wXh2I03T9OrMJzJ4s08aqCKMSBat6ymNuJLzVv2OZiGQ-Y6BCcPZDLIOT7tFBvFG8DRREBJ7GBmsHDccpRS1hgcVu94-yYgiWe3qXkTt57rOMFxyCJjX8cEOsCojtMI4O-DeanOK7kqyv_L1n05Wlac3QFrNgEBQY17tq10zafWGEc1HMookDboIXdruW-yJY1GQSueIsjFfed4mi_udTkrNHw9X9HClQ1-8eUYvPdftIZySFAPYxrLOdhKNf0edyLVtRy4IM2SaD_C0KLeFeUs3GWTrtt4JDl8xoJHK5yw5061iT8TZM506L31s4oCYATLgDru5u1vkIvbFC9B7u8ev8dxJ0OqHntNW9B9Zlg/http%3A%2F%2Fcarrknight.github.io%2F
> <http://secure-web.cisco.com/1562ifeoOT72dlamK3r83vzdIyaa60nlh9fC55VkOXkH4rsEFHIKqEq1pKepBEhhjf-yXsXnla5T0RciD3wIQpVHooh3PBrh8mfj_7Axhebo6rYbzSOiRijCKtWSoC33Jw3Q_SP2AraFMZ4xu9X2u06hvm8ecU5geVfoHUOzP-LxzCjRuyNW9t0PblzvzCdbP0iP4XG3OWZkUoj1IHB-w1N1trdyQXmQ26vmUA07kyFY1Qnih0_iI2nqEmo_3oOr-7oZhnv9h4jHxdHxDjmPrZuibvtjgOvYns9rm9-O0QTYLaQqB4pnt_LK7vLuFLe69kizmDzXn5Fm0gsuHYjDRKUJjpZRHm4feLsQq5A2iY3WtrW82PLK4TNoeiFUgzzGdL_pawxIQZjFSssh8mxlF7f3TEYFUBymv0ww2tK2Dptf6UJAZgxTvFOCg5bc7cDrAuQkwNvZC3wFAarG9DSdYDmGJdWmlKUMG4ePgPpopkWc/http%3A%2F%2Fcarrknight.github.io%2F>
>


-- 
Ernesto Carrella
http://secure-web.cisco.com/1U82Cfw1pwX4LE2X3daRsDfAw7gVtDg7IN79jzQbn_hvl7Ef6j6XDjwvQdyT-cuXO3NHP3gTheZyVHWQ85y6tthGmWHLdwXJXhA0dEDgwQro5wXh2I03T9OrMJzJ4s08aqCKMSBat6ymNuJLzVv2OZiGQ-Y6BCcPZDLIOT7tFBvFG8DRREBJ7GBmsHDccpRS1hgcVu94-yYgiWe3qXkTt57rOMFxyCJjX8cEOsCojtMI4O-DeanOK7kqyv_L1n05Wlac3QFrNgEBQY17tq10zafWGEc1HMookDboIXdruW-yJY1GQSueIsjFfed4mi_udTkrNHw9X9HClQ1-8eUYvPdftIZySFAPYxrLOdhKNf0edyLVtRy4IM2SaD_C0KLeFeUs3GWTrtt4JDl8xoJHK5yw5061iT8TZM506L31s4oCYATLgDru5u1vkIvbFC9B7u8ev8dxJ0OqHntNW9B9Zlg/http%3A%2F%2Fcarrknight.github.io%2F