swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Re: Support Digest, Vol 4, Issue 14


From: Rob McDermott
Subject: [Swarm-Support] Re: Support Digest, Vol 4, Issue 14
Date: Mon, 18 Oct 2004 11:49:43 +1300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

Hi
I program SWARM using Eclipse.
Basically, Eclipse is simply the tool with which I write SWARM Java classes to implement my agents and stuff.

1. Create a project in Eclipse
2. Add the library swarm.jar to your build path. On my system, this is c:\Swarm-2.2\share\swarm\swarm.jar

You're not going to be able to RUN the model from within Eclipse, because it runs under cygwin... so here's what I do: - For unit testing, I had to write a couple of Java classes to implement the SWARM classes that were'nt available to me under Eclipse (such as a Grid2D) but that I really needed to test my agents. I wrote a simple test class that instantiates the model and puts it through various test cases. - Once I've got my model programmed in Java, I compile it to native code using gcj. I do this from cygwin, using a simple script, because the command line is kinda long. I do this to get around the problem with Java SWARM's not initialising properly. - Then, I run the model... You can run it either from in cygwin, or from windows - as long as you have cygwin installed correctly it will run.

Probably the build path is your problem, but if you have any other questions let me know.
regards
Rob McDermott



reply via email to

[Prev in Thread] Current Thread [Next in Thread]