Embedthis Appweb 3.0A.0
Home >Man Pages> ejsvm

ejsvm Man Page

EJSVM(1)                         User Commands                        EJSVM(1)
NAME
       ejsvm - Ejscript Virtual Machine.
SYNOPSIS
       ejsvm  [--class  className]  [--ecma]  [--modules "modules..."]  [--log
       logSpec] [--method methodName] [--searchPath ejsPath] [--version]  mod-
       ule [arguments ...]
DESCRIPTION
       The  ejsvm command runs Ejscript programs by loading and executing mod-
       ules compiled via the ec Ejscript compiler.  The ejsvm command provides
       a Virtual Machine environment for ejscript programs complete with class
       loader, byte code execution, garbage collection and core system  types.
       If you wish to run Ejscript programs interactively or to parse and exe-
       cute in one-step, use the ejs command shell.
INVOCATION
       The ejsvm command can also invoke a specific static method on  startup.
       If  either  the  --class  or --method switches are supplied, then ejsvm
       will run the requested static method after the input file script state-
       ments have been executed.
ORDERING
       The ejsvm command will load the specified module and any dependent mod-
       ules that have been requested via "use module"  directives.  Then  load
       any  additional  modules  specified  via  the  --modules switch will be
       loaded with their dependent modules. After a module and  its  dependent
       modules  are  loaded,  the global statements of the module will be exe-
       cuted.
BACKGROUND
       Ejscript is an interpreted, object oriented scripting language  and  is
       an  enhanced  implementation  of  the  emerging  ECMAScript  Edition  4
       (Javascript)  language.  Ejscript  supports  statements,   expressions,
       objects,  classes,  exceptions,  namespaces, iterators, type annotation
       and a powerful suite of data types.
       While Javascript is the language of  the  browser,  Ejscript  has  been
       designed  to  run Javascript outside a browser. The goal of Ejscript is
       to create a language ideally suited  for  embedded  applications  where
       efficiency of execution is a paramount concern.
OPTIONS
       --class className
              Use  the  given  className when searching for the startup method
              specified via --method or "main" by default.
       --module "module ..."
              Normally modules are loaded automatically by the Ejscript loader
              in  response  to  "use module name" directives in ejscripts, but
              you can use the --module "modules" switch to load  modules  that
              contain global script code outside any "module {} directive.
       --log logName[:logLevel][.maxSize]
              Specify  a file to log internal execution messages. Ejs will log
              execution related trace to the log file. The log level specifies
              the  desired  verbosity  of output. Level 0 is the least verbose
              and level 9 is the most. Level 2  will  include  trace  of  each
              source  statement  and  assembler instruction executed (provided
              the source was compiled with --debug).  When the maximum size is
              specified  (MB)  and  exceeded,  the log file will be rotated to
              logName.old and a new log file will be started.
       ---method methodName
              Set the startup method name. Defaults to "main" if a --className
              is specified and --method is not.
       --searchPath ejsPath
              Override the module search path. The module search path is a set
              of directories that the ejsvm command will use when locating and
              loading  Ejscript  modules.  Given  a  module named "a.b.c" in a
              script, ejsvm will use the following search strategy  to  locate
              the module:
              1. Search for a module file named "a.b.c.mod"
              2. Search for a module file named "a/b/c.mod"
              3. Search for a module file named "a.b.c.mod" in EJSPATH
              4. Search for a module file named c.mod in EJSPATH
              The  search  path  is  initiallly  specified via the environment
              variable EJSPATH and may be overridden via the --searchPath ejs-
              Path switch. EJSPATH and the ejsPath command line value are sim-
              ilar to the system PATH formats. On windows, path  segments  are
              separated  by  ";" and on Linux, Unix, FreeBSD and MAC, the path
              segments are separated by ":" delimiters.
       --version
              Print the ejsvm command version and exit.
REPORTING BUGS
       Report bugs to &ltdev@embedthis.com&gt.
COPYRIGHT
       Copyright (C) 2004-2009 Embedthis Software.  Ejscript is a trademark  of
       Embedthis Software.
SEE ALSO
       ec, ejs, ejsmod
ejsvm                              May 2009                           EJSVM(1)

© Embedthis Software LLC, 2003-2009. All rights reserved. Embedthis, Ejscript and Appweb are trademarks of Embedthis Software LLC.