How to generate a standalone simulator (Virtual Device Player) that runs without MicroEJ SDK/Studio installed on your machine

Requirements:

  • A MicroEJ SDK 21.11
  • A MicroEJ VEE Port imported into the MicroEJ repository. See
    (MicroEJ Resources)
  • An activated Evaluation or Production license.
  • A working Java application that runs on the above VEE Port simulator

Instructions:

  • Right click on your Java application project and select ‘run as>run configurations’.

  • Select common tab. Check save as shared file and apply to save launcher properties.

  • A new file ___.launch will be added to your Java application project. Right click on this file to export launcher properties.

  • Choose Launcher as Properties File and save it to the build folder of your Java application project.

  • Open the module.ivy file and replace the application.main.class propertie’s value by your application’s main full qualified name (e.g. <ea:property name="application.main.class" value="com.microej.example.Main"/>)

  • Under it, add property <ea:property name="virtual.device.sim.only" value="SET" />

  • Uncomment this line <ea:property name="platform-loader.target.platform.dir" value="[path-to-local-platform]" /> and replace value path to the source folder of your local VEE Port.

  • Build your Java project with EasyAnt (right click on the project → Build Module).

Output

A .zip file is created in the Artifacts’ folder in the player project. The zip file contains a standalone
executable that runs without MicroEJ SDK installed on your machine. JRE8 or later is required to
execute the standalone player executable.