Fabric
0.2.1
|
This guide demonstrates how to run a Fabric program. As a running example, we will use a worker named valinor
, with /opt/fabric
as the application home. The commands given are relative to the Fabric installation directory.
The following command starts the worker, executes the class hello.Main
, and shuts down the worker. If the worker is already running, then the command attaches to the already-running worker and executes hello.Main
from within that instance.
The --jvm-cp
option specifies a path containing the (non-mobile) class hello.Main
and any non-mobile classes it uses.
To execute a mobile class, specify the class's codebase-relative name. For example,
If a class name is not given when starting a worker, then the worker starts idle and the user is given a worker shell:
Stores also have worker shells for their colocated worker:
To execute a non-mobile class from within the worker, simply enter the class's name into the shell:
The worker must have the requisite non-mobile classes on its class path, as specified by the --jvm-cp
command-line option when starting the worker.
To execute a mobile class, enter the class's codebase-relative name: