Chapter 2. Calling Kermeta main operations from a standalone Java program

This tutorial shows how a standalone java program can call kermeta operations that have been declared as main entry point of the kermeta program thanks to the @main tag on operations.

TODO explain and illustrate

2.1. Presentation/key points

This tutorial will detail the following points:

  1. Create a new Kermeta project

  2. Declare one or many operations as main operations using the @main tag

  3. Generate a basic jar file from the Kermeta project (using a simplified pom.xml)

  4. Create a new Java project that depends or embedds the jar of the kermeta project

  5. Call a Kermeta main operation using the corresponding Runner class from to the java project. These Runner classes will take care of the required initialization

  6. Execute the java program as a standalone application