Run on the Simulator¶
Once a Sandboxed Application project has been created, it can be tested on the Simulator.
The Simulator requires a Virtual Device to execute the Application. Please refer to the Kernel Developer Guide to learn how to get or create one.
From the SDK¶
In order to test a Sandboxed Application in the SDK, the first thing to do is to import the Virtual Device of the Multi-Sandbox Executable:
- go to Window > Preferences > MicroEJ > Virtual Devices
- click on Import…
- the Virtual Device can be provided as a folder or as a
.vde
file, select the adequate format and the Virtual Device resource - check the License checkbox to accept it
- click on Finish

Virtual Device Import¶
Now the Application can be executed by right-clicking on its project, then clicking on Run As > MicroEJ Application.

Sandboxed Application Run¶
If there is only one Virtual Device imported in the SDK, it is automatically used to execute the Application. Otherwise, you have to select the one you want to use.
With the Application created in the section Create a First Application, the output should be:
=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
KERNEL Hello World!
=> Starting Feature MyApplication
Feature MyApplication started!
=============== [ Completed Successfully ] ===============
SUCCESS
From the Command Line Interface¶
An Sandboxed Application can also be launched on the Simulator via the Command Line Interface. Before continuing, make sure the Command Line Interface is installed and correctly configured.
In your favorite terminal application, go to the root folder of the Application and execute the following commands:
mmm build
mmm run -Dplatform-loader.target.platform.file=/path/to/the/virtual-device.vde
With the Application created in the section Create a First Application, the output should be:
MicroEJ Simulator is being launched. Relax and enjoy...
=============== [ Initializing Easyant ] ===============
=============== [ Resolving and retrieving dependencies ] ===============
=============== [ Compiling sources ] ===============
=============== [ Loading platform ] ===============
=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
KERNEL Hello World!
=> Starting Feature MyApplication
Feature MyApplication started!
=============== [ Completed Successfully ] ===============
SUCCESS
Note that the Virtual Device location can also be configured in the module.ivy
file of the Sandboxed Application project:
<ea:property name="platform-loader.target.platform.file" value="/path/to/the/virtual-device.vde"/>
The Virtual Device can also be provided differently, for example from a dependency in the module.ivy
file.
Refer to the Platform Selection section for the list of available capabilities.