Running MobiComp
From MobiComp
Important
Read the Context.properties page before attempting to run MobiComp. It describes the Context.properties configuration file.
Examples
Most trackers, listeners and aggregators can be run using the ContextMonitor program, the source code for which is in the mobicomp/src directory. ContextMonitor expects to find a comma-separated list of trackers and other component class names in the system property trackers. This property may be included in the Context.properties file or on the command line. As an example, consider these sample scripts that may be used in the mobicomp directory to run the BluetoothTracker on windows and linux platforms. Note that the commands are broken over several lines to aid illustration. They should normally be on a single line.
runbt.bat:
java -classpath .\dist\context.jar;..\lib\common\xpp3.jar;..\lib\winxp\BlueCove.jar;..\lib\ppro10\classes.zip -Dtrackers=org.mobicomp.bluetooth.BluetoothTracker ContextMonitor
runbt.sh:
java -classpath \ ./dist/context.jar:../lib/common/xpp3.jar:../lib/linux/jbluez.jar:../lib/ppro10/classes.zip \ -Dtrackers=org.mobicomp.bluetooth.BluetoothTracker ContextMonitor
Many trackers include a main method, primarily for testing purposes. This script shows an example in which the tracker is invoked directly, without using the ContextMonitor. The runtime parameter at the end of the command is the URL that will be broadcast by the beacon:
runirbeacon.bat:
java -classpath .\dist\context.jar;..\lib\common\xpp3.jar;..\lib\ppro10\classes.zip org.mobicomp.ir.IRBeacon http://www.epoch-net.org

