Chapter 7 Practical scripting in Java

Overview

This chapter focuses on using scripting languages for tasks that are a part of every development process, such as:

  • Unit testing
  • Writing build files
  • Writing startup scripts
  • Administration and management

Code samples

Download

Notes

  • Assertion methods are demonstrated in src/net/scriptinginjava/ch7/test/AssertTest.groovy
  • To run Ant BSF example run
    ant -f src/net/scriptinginjava/ch7/build/build.xml
  • To run Quartz demo you should have to run it with org.quartz.properties VM option set to src/net/scriptinginjava/ch7/admin/quartz.properties. For example
    java -classpath:$CLASSPATH  \
    -Dorg.quartz.properties=\
    src/net/scriptinginjava/ch7/admin/quartz.properties \
    net.scriptinginjava.ch7.admin.Start