Setting Up OpenMRS Developer Environment(Windows 10)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 must install the following '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
The result should be:
...
Code Block | ||
---|---|---|
| ||
javac -version |
You should see something like:
Code Block | ||
---|---|---|
| ||
javac 1.8.0_65 |
or whatever version you currently have
Check for JRE by going to the command prompt and typing:
java –version
The result should be similar to:
java version Next, check for the JRE by typing:
Code Block | ||
---|---|---|
| ||
java -version |
The output should look similar to:
Code Block | ||
---|---|---|
| ||
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 Java 1.6The . If you don't have Java installed or need to update, you can download the latest versions of JDK and JRE can be found at the following link:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
MYSQL
For MySQL you must know MYSQL your 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 ready prepared with a username and password
http://dev.mysql.com/downloads/mysql/
. To download MySQL, visit the MySQL Downloads page.
Eclipse IDE for Java EE Developers
Download and install the Eclipse IDE for Java EE Developers
http://www.eclipse.org/downloads
Install Jetty plugin for Eclipse
In Eclipse go to Help>Install New Software
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:
...
Code Block language url https://github.com/openmrs/openmrs-core
...
Select all branches and
...
choose a destination for the files.
After the OpenMRS files have been imported go 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
Compiling To compile OpenMRS: From the command prompt
Open the Command Prompt and navigate to the OpenMRS project directory.
...
Run the following command:
mvn clean install
Run OpenMRS
Code Block language bash mvn clean install
Running OpenMRS
To run OpenMRS:
Download the Logic module
.omod
file and place it in theopenmrs-core/puppet/modules
...
https://modules.openmrs.org/modules/view.jsp?module=logic
...
directory. You can download the module from this link.
In the Command Prompt, navigate to the
openmrs-core/webapp
directory.
...
Run the following command:
...
Code Block language bash mvn jetty:run
...
Wait for
...
the
[INFO] Started Jetty Server
message to appear.
...
Open your web browser and go to:
Code Block language url 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.