These instructions will help you install OpenMRS Reference Application 2.x.
The OpenMRS Reference Application standalone requires your system to have a few basic things:1.
- A web browser
- . Download and install Mozilla Firefox or Google Chrome. OpenMRS works fine on Safari, but we wouldn’t recommend that you use Internet Explorer.
- Java. You must have Java Runtime Environment or Java Development Kit 1.
The OpenMRS standalone runs on an older version of Java --- Java 1.7 (yes, we have to go a bit back in time). So go ahead and install JDK 1.7 on your computer
Remember where you’ve installed it!
To check which versions of Java are installed on your computer, go to Terminal on a Mac and type the following:
You should see a list of Java Virtual Machines on your computer. For example, if you have both 1.7 and 1.8 running on your computer, you would get an output that looks something like this:
Matching Java Virtual Machines (2):
1.8.0_101, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
1.7.0_79, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
- 8. If you don't have Java 8 installed, follow these instructions for Oracle's Java (recommended).
Verify you have Java 1.8+ installed by opening a terminal and typing the command:
If you are using more than one version of Java on your machine, consider using jenv, a handy utility for managing and easily switching between java versions.
If you are a Windows user you can follow the these instructions here to find out which versions of Java are installed on your computer: https://java.com/en/download/help/version_manual.xmlVerify that Java
Download the OpenMRS
Go to: http://openmrs.org/download/And and download the most recent version – – e.g., “Reference Application 2.6.4 1 Standalone Edition”.
2. Unzip the
When you open the unzipped folder you will see that everything is available and prepacked with a demo database of patients as well.
There’s just one last step -
Before you run the standalone version of OpenMRS, you have to tell your computer which version of Java to use when running OpenMRS (because we want to use an older version of Java). In order to do that you have to set the JAVA_HOME variable (its basically an environment variable that points to the location of the Java interpreter/compiler) and you do this through your computer’s command line interface.
To set the JAVA_HOME variable in Mac go to Terminal and type in the following command:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
To check that its been set:
or at command line type:
Your output should be something like this:
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
On a Windows system, to set JAVA_HOME:
a. Right click My Computer and select Properties.
b. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.
Now that JAVA_HOME is set, you can run the OpenMRS standalone.
|Content by Label|
3. Run the Standalone
You should be able to start the OpenMRS Standalone by double-clicking on the
Alternatively, from the command line, navigate to the folder containing the openmrs-standalone.jar file and you can start OpenMRS with the command:
java -jar openmrs-standalone.jar
See the OpenMRS Standalone page for more details on optional command line parameters.