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 -versionYou should see something like:
javac 1.8.0_65Next, check for the JRE by typing:
java -versionThe output should look similar to:
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)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
Addand enter the following details:Name: Jetty
Location:
http://run-jetty-run.googlecode.com/svn/trunk/updatesite
Select
Run JettyRunand clickNextto 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 URIand enter the following URI:https://github.com/openmrs/openmrs-coreSelect all branches and choose a destination for the files.
After the OpenMRS files have been cloned:
Go to
File > Importagain in Eclipse.Select
Maven > Existing Maven Projects.Click
Browseand navigate to theopenmrs-corefolder.Select all projects and click
Finishto importopenmrs-coreinto your Eclipse workspace.
Compiling OpenMRS
To compile OpenMRS:
Open the Command Prompt and navigate to the OpenMRS project directory.
Run the following command:
mvn clean install
Running OpenMRS
To run OpenMRS:
Download the Logic module
.omodfile and place it in theopenmrs-core/puppet/modulesdirectory. You can download the module from this link.In the Command Prompt, navigate to the
openmrs-core/webappdirectory.Run the following command:
mvn jetty:runWait for the
[INFO] Started Jetty Servermessage to appear.Open your web browser and go to:
http://localhost:8080/openmrs
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.