See [com.waratek.cloudvm.TomcatClusterApplication](https://github.com/cloudsoft/brooklyn-waratek/blob/master/src/main/java/com/waratek/cloudvm/TomcatClusterApplication.java) and [com.waratek.cloudvm.Main](https://github.com/cloudsoft/brooklyn-waratek/blob/master/src/main/java/com/waratek/cloudvm/Main.java) where the applications are defined in Java classes that extend `AbstractApplication` and implement `StartableApplication` and the `Main` class is a simple class that extends the Brooklyn CLI and adds some options to select the application to launch:

```java
public class Main extends brooklyn.cli.Main {
```