Wednesday, April 09, 2008

Compiling AgentCell

So it works! And it was a SIMPLE little fix:

===========
# Note the file list.
filelist="c:/cygwin"$PWD"/filelist"
===========
All else remains the same. So the final javacompile file looks like this:

----------------------------------------------------------------------
#!/bin/bash -x

# Note the initial directory.
calldir=$PWD

# Note the file list.
filelist="c:/cygwin"$PWD"/filelist"

# Move to the initial directory.
cd $calldir

#DEFINE the win32 native java install using cygdrive reference to drive C:\
#JPATH=/cygdrive/c/Java/jdk1.6.0_05

# Find the available Java files.
find edu -name *.java -print > $filelist
find uchicago -name *.java -print >> $filelist

#show filelist
#cat $filelist

# Compile the available Java files.
javac -classpath .:lib/repast.jar:lib/colt.jar:lib/commons-collections.jar:lib/commons-logging.jar:lib/geotools.jar:lib/jakarta-poi.jar:lib/jgl3.1.0.jar:lib/jh.jar:lib/jmf.jar:lib/JTS.jar:lib/junit.jar:lib/log4j.jar:lib/mediaplayer.jar:lib/multiplayer.jar:lib/plot.jar:lib/sound.jar:lib/trove.jar:lib/xerces.jar:lib/hdf4.jar:lib/jhdf4obj.jar:lib/jhdf.jar:lib/jhdfobj.jar @$filelist
#javac -cp .:lib/repast.jar:lib/colt.jar:lib/commons-collections.jar:lib/commons-logging.jar:lib/geotools.jar:lib/jakarta-poi.jar:lib/jgl3.1.0.jar:lib/jh.jar:lib/jmf.jar:lib/JTS.jar:lib/junit.jar:lib/log4j.jar:lib/mediaplayer.jar:lib/multiplayer.jar:lib/plot.jar:lib/sound.jar:lib/trove.jar:lib/xerces.jar:lib/hdf4.jar:lib/jhdf4obj.jar:lib/jhdf.jar:lib/jhdfobj.jar:./edu/*:./uchicago/*


# Clean up.
rm $filelist

----------------------------------------------------------------------

Now to actually try to do the calculations the AgentCell bactertial paper did. Somehow my first tries aren't too promising! :) More later.

-------------------
However, it seems that the RePast libraries aren't being properly recognized. Since I had a good experience working with RePast and Eclipse as an IDE, decided to switch to that. Imported the source file structure. It compiles, and linked stochsim.dll with the following command to the VM:

-Djava.library.path=$libstochsimpath

Oddly the example doesn't compile asking for an output folder etc. So to all obvious purposes that part works.

No comments: