Skip to content

Arden2ByteCode Command Line Reference

hflicka edited this page Mar 14, 2012 · 9 revisions

Synopsis

arden2bytecode [OPTIONS] [FILE] [FILE...]

Options

  • -h, -?, --help
    Display help to command line options.
  • -c, --compile
    Compile the input files (must be of .mlm type) and write output of compiler to .class files.
  • -o FILE, --output FILE
    Output .class file to write compiled MLM to. This is intended to be used in conjunction with -c.
  • -r, --run
    Run the input files directly. The input files must be either .mlm files which will be compiled in-memory or already compiled .class MLMs.
  • -v, --verbose
    Verbose output mode.
    For example the input files will be explicitly listed in this mode.
  • -n, --nologo
    Don't display the header with program name and licensing information.
  • -a, --arguments
    Specify arguments to the MLM. These are available in the MLM data slot via the argument identifier.
    Arguments that are formatted as floating-point numbers (e.g. 12.34e+5 or 1234000) are passed as numbers while all other arguments are passed as strings.

Setting up the MLM environment/context

  • -p, --classpath
    An additional classpath from where the database driver may be loaded.
    For SQLite-JDBC, this might be <path>/sqlite-jdbc-3.7.2.jar, depending on the version.
    For MySQL, it is <path>/mysql-connector-java-5.1.18-bin.jar
  • -d, --dbdriver
    The class name of the database driver.
    For SQLite, I use org.sqlite.JDBC.
    For MySQL, this is com.mysql.jdbc.Driver.
  • -e, --environment
    The environment string used in the Arden2ByteCode runtime environment. JDBC connection strings imply that a JDBC environment is set up.
    For SQLite, I set this to: jdbc:sqlite:<dbfile>. You can also use a blank <dbfile> to use a in-memory DB.
    For MySQL, things are more complicated. Read Connector/J docs for more information.

Input Files

All further command line arguments will be regarded as input files.

Examples

  • arden2bytecode -r hello_world.mlm
    Will compile and run hello_world.mlm without saving to .class file.
  • arden2bytecode -o hello_world.class -c hello_world.mlm
    Compile hello_world.mlm and save to hello_world.class. The MLM will not be run.
  • arden2bytecode -r hello_world.class
    Run already compiled MLM hello_world.class.
  • arden2bytecode -nr hello_world.mlm
    Run MLM without displaying logo.
  • arden2bytecode -nvc *.mlm
    Compile all MLMs in one directory verbosely. Don't display logo.
    This will only work if your command line interpreter supports expansion of * arguments.

Clone this wiki locally