Using Eclipse
Introduction
You can use Eclipse to write and debug Java actions in your Mendix app. When the Mendix model is deployed, an Eclipse project file, classpath file, and launch configuration are generated.
Setting Up Eclipse
In Mendix, all text is saved in UTF-8 encoding. To make sure your source code is also saved in UTF-8, do the following:
-
Select Window > Preferences.
-
Select Workspace in the new menu window.
-
Select UTF-8:
You should also have a Java Development Kit (JDK) installed and selected.
Make sure to add a JDK and select it as the default in Eclipse.
Adding a Mendix App
To add a Mendix app to Eclipse, do the following:
-
Select File > Import.
-
Open the General folder, select Existing Projects into Workspace and select Next >:
-
Use the option Select root directory, browse to your Mendix app folder and select Finish:
Launching a Mendix App
To launch the app, do the following:
-
Select Run > Run configurations… or Run > Debug configurations…, depending on how you would like to start the application.
-
Select Java application and a launch configuration—generated by Mendix Studio Pro—will appear.
-
Select Run (or Debug) to start the application:
After you have launched the application, the M2EE Admin Console will appear. This is the same console as you would normally see in Mendix Studio Pro, if you would run the application from there. You can stop your application by closing the console.