Hi Guys.
I have a bit of a debocle here.
I am running Eclipse on my Macbook Pro. I have an assignment for school (in Java) that uses a provided Simulator.jar package. The jist of it: create an instance of the Simulator, run it, and create creatures for the simulator (e.g. insect).
Now the problem I am getting is that when I run the class (the one that creates a new Simulator), everything works wonderful. The Simulator engine runs and I get a window coming up that says open, save, continue, quit, stop. Now what I am supposed to do is open a .conf file. In the .conf file, it says "insect (int,int,int,int)" where int is any integer.
My integer class is properly formatted, implementing the Simulated Entity interface, with the proper number of parameters. When I open this file, it says "world.insect not found. mispelled class name or missing package name".
What this means, is that when I open the new simulator and open the config file, it looks for "insect.class", in the package that i specify "world", which my insect class IS a part of.
For some reason, when I copy my 2 .java files onto a PC, and compile and run them, they work fine.
Is it something to do with Mac? Eclipse? I have tried compiling and running it through terminal and I get the same error.
If it helps at all, the link to the assignment is here:
http://www.cosc.brocku.ca/Offerings/...signment1.html
My .java files are as follows:
insect.java:
package world;
import java.awt.Color;
import Simulator.*;
public class insect implements SimulatedEntity {
public insect (int a, int b, int c, int d){
}
public Coordinates getLocation(){
return null;
}
public boolean isAlive(){
return false;
}
public void die(){
}
public String toString(){
return "test";
}
public Color getColor(){
return null;
}
public void act (World world){
}
}
runsim.java:
package world;
import Simulator.*;
public class runsim {
public runsim(){
Simulator sim = new Simulator ("runsim", 200, 200, SimulatorColors.WHITE, "world");
sim.run();
}
public static void main (String args[]){new runsim();};
}
My .conf file reads:
XSize: 400
YSize: 400
Entities:
insect(1,1,1,1)
That is everything. Any help at all woudl be GREATLY appreciated!
Thanks in advance.
Bryan