Step 1: Setup and create a project

1. Set up the environment

1.1. Download Eclipse

  1. Download "Eclipse Modeling Tools" (about 500 MB) from https://www.eclipse.org/downloads/packages/release/2024-06/r/eclipse-modeling-tools.

  2. Unpack.

1.2. Install JavaFX

  1. Go to https://gluonhq.com/products/javafx/

  2. Scroll to the 'Downloads' section.

  3. Choose 'JavaFX version' = 21.0.2 [LTS] and download the SDK package for your OS.

  4. On Windows: unpack the downloaded archive to the 'Program Files/Java' folder. A new folder 'c:\Program Files\Java\javafx-sdk-21.0.2\' should appear.

1.3. Eclipse post-setup steps (do this only once, after Eclipse installation)

  1. Start Eclipse.

  2. Install 'e(fx)clipse' and 'ResourceBundle editor' via the 'Help → Eclipse Marketplace' Eclipse menu item.

  3. Install the 'Amalgama Desktop Application wizard':

    1. In Eclipse, go to 'Help' → 'Install New Software…​'

    2. Put the following URL to the 'Work with' field: https://nexus.am-sim.com/repository/wizard-p2/latest/

    3. Install 'Desktop Application Wizard'.

Wizard installation

Restart Eclipse.

1.4. Setup Eclipse workspace (do this once per each new workspace)

  1. Start Eclipse.

  2. Go to the Windows - Preferences and locate the JavaFX section.

  3. In the "JavaFX 11+ SDK", select the 'lib' folder of your local JavaFX installation.

JavaFX path in Eclipse

Now, the Eclipse is ready.

2. Create and run a new project

2.1. Create a project

  1. In Eclipse, Choose 'File' → 'New' → 'Amalgama Desktop Application'. A new wizard window opens.

  2. Enter the project name (let it be 'Warehouse')

  3. Press 'Finish'. A new project has been created and opened in the 'Project Explorer' part.

New project created by the wizard

HINT: If there is no 'Project Explorer' part, then switch to the 'Plug-in Development' perspective via the’Open Perspective' button in the right end of Eclipse’s toolbar.

2.2. Select the active target

  1. Open the releng/com.company.warehouse.target/com.company.warehouse.target.target file.

  2. Click 'Set as Active Target Platform' (top-right).

  3. Wait till target resolution is complete.

Now the project should compile without issue.

2.3. Update the product file

Open the releng/com.company.warehouse.product/com.company.warehouse.product file. In the 'Launching' → 'win32' tab, use the following line for 'VM arguments' (use the same value you entered in the Window → Preferences window in the JavaFX page):

VM Arguments
-Defxclipse.java-modules.dir="C:\Program Files\Java\javafx-sdk-21.0.2\lib"

This is necessary for JavaFX to be available to the application at runtime.

2.4. Run the application

Run the product by pressing the green button in the product file editor (top right) and make sure the main window appears:

Application window