Skip to content

Commit

Permalink
Merge pull request #6474 from lvanengelen/development
Browse files Browse the repository at this point in the history
Clarifications for Using Eclipse flow
  • Loading branch information
MarkvanMents authored Sep 1, 2023
2 parents 51562a5 + 55fd777 commit b8948da
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
35 changes: 20 additions & 15 deletions content/en/docs/refguide/java-programming/using-eclipse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,57 @@ url: /refguide/using-eclipse/
weight: 2
category: "Java Programming"
description: "Describes how to set up Eclipse, and how to add a Mendix application to Eclipse and launch it."
tags: ["studio pro"]
tags: ["studio pro", "Java", IDE"]
---

## 1 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.
You can use [Eclipse IDE for Java Developers](https://eclipseide.org/) to write and debug Java actions in your Mendix app.

## 2 Setting Up Eclipse
## 2 Deploy For 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:
To use Eclipse, you first need to set up your app so that Eclipse recognizes it.

In Studio Pro, open the Mendix app containing the Java actions you want to edit. Select **App > Deploy for Eclipse** to generate the necessary files for Eclipse to recognize the App directory as a Java project. This generates the Eclipse project file, classpath file, and launch configuration.

## 3 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 in Eclipse:

1. Select **Window > Preferences**.
2. Select **Workspace** in the new menu window.
3. Select **UTF-8**:

{{< figure src="/attachments/refguide/java-programming/using-eclipse/eclipse-utf8-encoding.png" alt="Settings UTF-8 encoding" >}}

You should also have a Java Development Kit (JDK) installed and selected.
You must also have a Java Development Kit (JDK) installed and selected. Make sure to add a JDK under **Installed JREs** and select it as the default in Eclipse.

{{< figure src="/attachments/refguide/java-programming/using-eclipse/eclipse-jdk.png" alt="Selecting a default JDK" >}}

Make sure to add a JDK and select it as the default in Eclipse.

## 3 Adding a Mendix App
## 4 Adding a Mendix App

To add a Mendix app to Eclipse, do the following:
To add a Mendix app to Eclipse, do the following in Eclipse:

1. Select **File > Import**.
2. Open the **General** folder, select **Existing Projects into Workspace** and select **Next >**:
2. Open the **General** folder, select **Existing Projects into Workspace** and click **Next >**:

{{< figure src="/attachments/refguide/java-programming/using-eclipse/eclipse-select-import.png" alt="Import existing project" >}}

3. Use the option **Select root directory**, browse to your Mendix app folder and select **Finish**:
3. Use the option **Select root directory**, browse to your Mendix app folder and click **Finish**:

{{< figure src="/attachments/refguide/java-programming/using-eclipse/import-eclipse-project.png" alt="Select root directory" >}}

## 4 Launching a Mendix App
## 5 Launching a Mendix App

To launch the app, do the following:

1. Select **Run > Run configurations...** or **Run > Debug configurations...**, depending on how you would like to start the application.
2. Select **Java application** and a launch configuration—generated by Mendix Studio Pro—will appear.
3. Select **Run** (or **Debug**) to start the application:
2. Find **Java application** in the list. It should contain a launch configuration with the same name as the Mendix app's directory.
3. Select the launch configuration.
4. Select **Run** (or **Debug**) to start the application:

{{< figure src="/attachments/refguide/java-programming/using-eclipse/eclipse-run-configuration.png" alt="Launch configuration" >}}

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.
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 had run the application from there. You can stop your application by closing the console.

{{< figure src="/attachments/refguide/java-programming/using-eclipse/eclipse-debug-log.png" alt="M2EE Admin Console" >}}
2 changes: 2 additions & 0 deletions content/en/docs/refguide/modeling/menus/app-menu/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ The **Deploy for Eclipse** option deploys the app to the deployment directory. T

Shortcut key: <kbd>F6</kbd>

For more information on how write Java actions from Eclipse, see [Using Eclipse](/refguide/using-eclipse/).

## 6 Create Deployment Package{#create-package}

The **Create Deployment Package** option creates a Mendix Deployment Archive package (*.mda*) that contains all necessary files to run the app. This can be used if you want to deploy your app on a Windows server or on a custom Mendix Cloud.
Expand Down

0 comments on commit b8948da

Please sign in to comment.