Windows

Setting up the OpenMRS development environment on Windows 10 requires installing several dependencies, configuring your IDE, and compiling and running the platform.

This guide will walk you through the process, ensuring you have everything configured correctly to get OpenMRS up and running on your system.

Dependencies

Before you begin building and compiling OpenMRS, you'll need to install and verify a few essential dependencies:

Java Development Kit (JDK) and Java Runtime Environment (JRE)

First, confirm that you have the JDK installed by opening the Command Prompt and typing:

javac -version

You should see something like:

javac 1.8.0_65

Next, check for the JRE by typing:

java -version

The output should look similar to:

OpenMRS requires at least Java 1.6. If you don't have Java installed or need to update, you can download the latest versions of JDK and JRE from Oracle's official website.

MySQL

You’ll need to have MySQL installed, and you'll need to know your MySQL root password or have a database prepared with a username and password. To download MySQL, visit the MySQL Downloads page.

Eclipse IDE for Java EE Developers

Download and install the Eclipse IDE for Java EE Developers from the Eclipse website.

Installing the Jetty Plugin for Eclipse

To set up the Jetty server in Eclipse:

  1. In Eclipse, go to Help > Install New Software.

  2. Select Add and enter the following details:

    • Name: Jetty

    • Location: http://run-jetty-run.googlecode.com/svn/trunk/updatesite

  3. Select Run JettyRun and click Next to install the Jetty plugin.

Importing OpenMRS Core from GitHub through Eclipse

To import the OpenMRS core project into Eclipse:

  1. In Eclipse, go to File > Import > Git > Projects from Git.

  2. Select Clone URI and enter the following URI:

  3. Select all branches and choose a destination for the files.

After the OpenMRS files have been cloned:

  1. Go to File > Import again in Eclipse.

  2. Select Maven > Existing Maven Projects.

  3. Click Browse and navigate to the openmrs-core folder.

  4. Select all projects and click Finish to import openmrs-core into your Eclipse workspace.

Compiling OpenMRS

To compile OpenMRS:

  1. Open the Command Prompt and navigate to the OpenMRS project directory.

  2. Run the following command:

Running OpenMRS

To run OpenMRS:

  1. Download the Logic module .omod file and place it in the openmrs-core/puppet/modules directory. You can download the module from this link.

  2. In the Command Prompt, navigate to the openmrs-core/webapp directory.

  3. Run the following command:

  4. Wait for the [INFO] Started Jetty Server message to appear.

  5. Open your web browser and go to:

By following these steps, you should now have a fully functional OpenMRS development environment set up on your Windows 10 system. If you encounter any issues or need further guidance, don't hesitate to consult the related documentation or reach out to the OpenMRS community.