Compiling from the command line

For those who refuse to use Eclipse, or want to perform their software builds in an automated way, there is a mobl command line compiler as well.


  1. A recent version of the Java SE SDK, if you don't have it already. Preferably version 6. To test if Java is already installed and, if so, what version you are running, open a command line console and type:
    java -version
  2. A clone or download of the mobl standard library:

    git clone git://
  3. moblc.jar, the compiler itself.


cd to your project's directory, then invoke the compiler as follows:

java -jar /path/to/moblc.jar -I /path/to/mobl-lib \
     -i yourapp.mobl

When the stdlib configuration is used in the project's config.mobl file, you can leave out the -I /path/to/mobl-lib:

stdlib /path/to/mobl-lib

Command-line switches

  • -i the .mobl file to compile
  • -I adds a directory to the module search path
  • -d the destination directory (defaults to ./www)
  • -O enable optimization mode (dead code elimination, code minification). (New in 0.4.0)


  • Error reporting does not mention line and column numbers, so errors are more difficult to trace back than while using the IDE
cli.txt · Last modified: 2013/10/01 02:28 (external edit)