1

I am using Eclipse to do some Java programming. I am working with an agent-based modelling library, MASON, and GeoMASON which is an extension that adds support for shapefiles etc. I've been having a lot of problems trying to get the included example models to run and I think it's because my file structure is different to what is expected and/or I have the JAR/data files in the wrong locations.

What is the best file/folder setup when working in Java/working with Eclipse and referencing other libraries and running included example models?

My current model, EngD_ABM_MK0, is in the following location with the following supporting files/folders:

/GoogleDrive/ABM/engd/EngD_ABM_MK0/src/engd_abm/EngDModelBuilder.java
/GoogleDrive/ABM/engd/EngD_ABM_MK0/bin/engd_abm/EngDModelBuilder.class
/GoogleDrive/ABM/engd/EngD_ABM_MK0/data/roads.shp
/GoogleDrive/ABM/engd/EngD_ABM_MK0/lib/mason.19.jar  
...

The MASON files are in the following location:

/GoogleDrive/ABM/MASON/sim/app/antsforage/AntsForage.java
/GoogleDrive/ABM/MASON/jar/mason.19.jar  
...

The GeoMASON files are in the following location:

/GoogleDrive/ABM/geomason/sim/app/geo/cityMigration/CityMigrationModel.java
/GoogleDrive/ABM/geomason/sim/app/geo/cityMigration/cityMigrationData/road_nodes.txt  
...

I also have a folder full of all the JAR files I need in the following location:

/GoogleDrive/ABM/lib/geomason.1.5.jar  
/GoogleDrive/ABM/lib/mason.19.jar  
/GoogleDrive/ABM/lib/j3dcore.jar  
...

In Eclipse I have EngD_ABM_MK0, MASON and GeoMASON as Java Projects (see screenshot). The EngD_ABM_MK0 project references MASON and GeoMASON in the 'Projects' Java Build Path and all the necessary JAR files have been added in the 'Libraries' Java Build Path (see screenshot).

Any advice would be appreciated.

Eclipse Java Structure Screenshot Java Build Path Structure Screenshot

KJGarbutt
  • 161
  • 8

0 Answers0