swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Query in running SwarmJava Tutorial on Windows XP


From: Diego Corredor
Subject: Re: [Swarm-Support] Query in running SwarmJava Tutorial on Windows XP
Date: Fri, 1 Jun 2007 07:14:15 -0500

Hi Kavita,

In the try - catch block I have changed the following line:

  sel = new Selector(Class.forName("SimpleBug"), "randomWalk", false);


for this one:

  sel = new Selector(Class.forName("swarmBug2.SimpleBug"),
"randomWalk", false);

and it works for me. The idea of the Class.forName() method is to
identify the class of the inputed file, so you can also use the
reportBug to identify the SimpleBug class using the following line as
well:

  sel = new Selector( reportBug.getClass(), "randomWalk", false);

However, the first alternative seems to be much more intuitive for me.

I hope both alternatives work for you.

Regards,


Diego Corredor


2007/6/1, Kavita Gangal <address@hidden>:
Hello,
I have tried to run the SimpleSwarmBug2 application (5 th step in the Java
tutorial found at the following link:
http://eco83.econ.unito.it/swarm/materiale/jtutorial/)

The application gets compiled without any errors. But while running, in the
file "ModelSwarm.java" it comes to the first try and catch block.
and the error is displayed on the console; which is the error defined by the
user in the program.
Could someone please tell me how to remove it?

--

Thanks and Regards,
Kavita Gangal
--
TIFR
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support




reply via email to

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