We strongly advise developers to use Maven in combination with an IDE, e.g. Eclipse, to develop for MATSim. But there are still situations when Eclipse is not available, for example if you need to run MATSim remotely on a server. These guidelines merely give some hints, how MATSim can be checked out and compiled on the command line, without giving too much information, assuming the reader already has experience and feels safe on the command line.
# Checking out the Code mkdir sandbox cd sandbox svn co https://matsim.svn.sourceforge.net/svnroot/matsim/matsim/trunk matsim svn co https://matsim.svn.sourceforge.net/svnroot/matsim/contrib/trunk contrib svn co https://matsim.svn.sourceforge.net/svnroot/matsim/playgrounds/trunk playgrounds # compile, test and install main MATSim project # installation in the local Maven repository is required for Contributions and Playgrounds to compile. cd matsim mvn install -DskipTests=true cd .. # compile, test, install the Contributions. # installation in the local Maven repository is required because of dependencies from Playgrounds. cd contrib mvn install -DskipTests=true cd .. # compile the playgrounds cd playgrounds mvn compile cd .. # if your playground depends on other playgrounds, those playgrounds must be installed as well: cd playgrounds mvn -fae install -DskipTests=true cd .. # run the Controler with some config-file, and give it 200MB of RAM # mvn exec:java automatically sets the classpath to include all dependencies cd matsim export MAVEN_OPTS=-Xmx200m mvn exec:java -Dexec.mainClass="org.matsim.run.Controler" -Dexec.args="/path/to/config.xml" # alternative call to start the Controler: # mvn exec:exec substitutes the argument "%classpath" with the actual classpath that includes all dependencies mvn exec:exec -Dexec.executable="java" -Dexec.outputFile=/path/to/logfile.log -Dexec.args="-Xmx200m -cp %classpath org.matsim.run.Controler /path/to/config.xml"
If Maven is not installed on the machine, download maven and unzip it in a local directory. After that, instead of the simple mvn-command you can use /path/to/your/apache-maven/bin/mvn to run the above commands.