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:
In Eclipse, go to
Help > Install New Software
.Select
Add
and enter the following details:Name: Jetty
Location:
http://run-jetty-run.googlecode.com/svn/trunk/updatesite
Select
Run JettyRun
and clickNext
to install the Jetty plugin.
Importing OpenMRS Core from GitHub through Eclipse
To import the OpenMRS core project into Eclipse:
In Eclipse, go to
File > Import > Git > Projects from Git
.Select
Clone URI
and enter the following URI:Select all branches and choose a destination for the files.
After the OpenMRS files have been cloned:
Go to
File > Import
again in Eclipse.Select
Maven > Existing Maven Projects
.Click
Browse
and navigate to theopenmrs-core
folder.Select all projects and click
Finish
to importopenmrs-core
into your Eclipse workspace.
Compiling OpenMRS
To compile OpenMRS:
Open the Command Prompt and navigate to the OpenMRS project directory.
Run the following command:
Running OpenMRS
To run OpenMRS:
Download the Logic module
.omod
file and place it in theopenmrs-core/puppet/modules
directory. You can download the module from this link.In the Command Prompt, navigate to the
openmrs-core/webapp
directory.Run the following command:
Wait for the
[INFO] Started Jetty Server
message to appear.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.