UIEvolutin Inc.
UJML Application Development User Guide
Compiling

The UIE compiler generates UJML byte code.

UJML byte code is the compressed data format used to send UJML applications to devices. It is highly compressed and therefore efficient over slow, high-latency networks. 

UJML byte code files are referred to using the extension .ujbc. UJML source code files use the extension .ujml. 

There are three methods by which UJML byte code can be generated: through a servlet, using the publishing scripts, or from the command line. 

The UIE compiler has the ability to use defined variables within UJML to control conditional compilation. These defined variables can also be set at the time the compiler is invoked. For more information on conditional compilation, see the UJML Language Reference.

Servlet Deployment

Configuration of the compiler within an application server environment is described in the Deployment Guide.

Publishing Applications

Compilation is a task that can be integrated into the publishing scripts of the UIE debugger. For more information consult the Publishing Guide.

Command Line Compilation

There should be a copy of compiler.jar on Java's classpath. If compiler.jar is in the same directory as the UJML file, then the compiler is invoked using:

java -jar compiler.jar {-O<name>=<value>} {-D<name>=<value>}* <in-file> <out-file>

 

The -O flag is used to set compiler options. The 'debug=true' option is used to generate byte code that is used by the UJML debugger. The 'trace=true' option is used to generate information used in the trace pane of the debugger

The -D flag is used to set conditional compilation parameters (the value to which a conditional compilation parameter is set has no effect). 

Example:

java -jar compiler.jar -Odebug=true -DVERBOSE=true myapp.ujml myapp.ujbc

 

This command tells the compiler to compile myapp.ujml to myapp.ujbc including generating debug byte code and setting the conditional compilation parameter VERBOSE.

Copyright (c) 2000-2005 by UIEvolution, Inc. All rights reserved.
What do you think about this topic? Send feedback!