AgileWiki > JActor2 documentation & downloads > Getting Started

Getting Started

Jars and Scripts

You will need a few things to work with JActor2:

  • JDK 7.
  • slf4j.
  • Google guava.
  • The JActor2 core and coreMt jar files. And
  • A test script. For windows, you can use test.bat:
    del *.class
    javac -classpath jactor2-core-1.0.0.jar;jactor2-coreMt-1.0.0.jar;slf4j-api-1.7.7.jar *.java
    java -classpath jactor2-core-1.0.0.jar;jactor2-coreMt-1.0.0.jar;slf4j-api-1.7.7.jar;slf4j-simple-1.7.7.jar;guava-18.0.jar;. %1
    
    Otherwise, you can likely use test.sh:
    rm -fr *.class
    javac -cp jactor2-core-1.0.0.jar:jactor2-coreMt-1.0.0.jar:slf4j-api-1.7.7.jar *.java
    java -cp jactor2-core-1.0.0.jar:jactor2-coreMt-1.0.0.jar:slf4j-api-1.7.7.jar:slf4j-simple-1.7.7.jar:guava-18.0.jar:. $1
    
  • Debug

    JActor2 has a debug mode. And when running in debug mode, additional checking is done that is likely too slow for production use. But it can be great when testing. Debug mode is set by assigning "true" to the jactor.debug system property. For example, you can turn debug mode on by adding this parameter when running JActor2:

    -Djactor.debug=true
    

    Configuration

    When no other configuration is specified, the PlantConfiguration PlantConfiguration class is used.

    To change the configuration, you first subclass PlantConfiguration. You can then create an instance of the subclass and pass it as a parameter to the Plant constructor. Or you can set a system property to the name of the subclass when running JActor:

    -Djactor.configurationClass=SubclassOfPlantConfiguration
    

    AgileWiki > JActor2 documentation & downloads > Getting Started