Skip to content

Latest commit

 

History

History

README.rst

Overview

This project explain how to create a mock for SNI and SP functions on the simulator.

Usage

How to add a mock to your project

For this example a native function will be used: public static native int foo(); This function will be in MyClass at my.package

  • Add a native method to your Java application. This native method will have two implementations:
    • One in C code in the platform BSP project (this part is not covered in this document)
    • One in Java (J2SE) in a new Java project for the simulator

Implement the J2SE mock

Export the mock

  • Build the Mock project (right click on the project > Build Module).
  • A .rip file is created in the target~/artifacts folder in the Mock project.
  • From the .rip unzip the content of content folder into the dropins folder of your platform configuration project (e.g. [Platform-Name]-configuration/dropins).
  • Build you platform.
  • Run your Java application on the simulator.

Create a Mock with a UI

A mock can show a separate UI to ease input/output. An example is provided

Requirements

This example has been tested on:

  • MicroEJ SDK 5.1.0
  • With a platform that contains:
    • EDC-1.2
    • BON-1.3
    • MICROUI-2.0
    • SP-2.0

Dependencies

All dependencies are retrieved transitively by MicroEJ Module Manager.

Source

N/A

Restrictions

None.