How to create an executable jar for the data bindings generator

From EdnaWiki
Jump to: navigation, search

In project `org.edna.datamodel.generateds` a launch config file `EDGenerateDS.launch` is placed in the project root folder. This launch config is used to create an executable jar for the Data Binding generator.

To create the jar open the File / Export dialog and select Runnable JAR file

Runnable jar export 1.png

On the next wizard page choose a target folder and file name `EDGenerateDS.jar`. Enable the option `Package required libraries into generated JAR`. Then finish the wizard to create the JAR file.

Runnable jar export 2.png

The resulting JAR file contains now all potentially required runtime libraries. The JAR file is quite huge (~27 MB) and only a small subset of classes is actually needed for runtime, but this is the easiest way to create the executable jar. For example, the JAR file contains the JAR, which is already 6 MB large. But actually very few classes are really used at runtime from it.