Setting up the system has been difficult. My laptop is running Windows 8.1, so that’s the first challenge I have.
First, when I tried to check which version of java I had installed, I got this output: “ ‘javac’ is not recognized as an internal or external command, operable program or batch file”. So, I decided to check: Program > Java > About > Version 7 (1.7.0-b147). The Developers Guide instructs to check the version as follow “javac –version” on the command line, but instead I entered “java -version” and it worked!
Then, I got stuck in the installation step. I downloaded and run the OpenMRS SDK installer. The wizard setup was completed without outputting any error. Once again, in order to get the output in the console I had to change “omrs-version” to uppercase, “OMRS-version”, otherwise the result would not have succeeded.
This time, the prompt line gave me an error: “JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environment to match the location of your Java installation”
If you are running into the same problem, here is the solution:
- Locate the Java Runtime Environment (JRE) Installation Directory
- If you didn’t change the installation path for the Java Runtime Environment during installation, it will be in a directory under C:\Program Files\Java. Using Explorer, open the directory C:\Program Files\Java.
- Inside that path will be one or more subdirectories such as C:\Program Files\Java\jre7
- Set the JAVA_HOME Variable
- Right-click the My Computer icon on your desktop and select Properties.
- Click the Advanced tab.
- Click the Environment Variables button.
- Under System Variables, click New.
- Enter the variable name as JAVA_HOME.
- Enter the variable value as the installation path for the Java Development Kit. (e.g.C:\Program Files\Java\jre7)
- Click OK.
- Click Apply Changes.
Close any command window which was open before you made these changes, and open a new command window. If the changes do not take effect even after reopening the command window, restart Windows.
After fixing the JAVA_HOME, I checked if the SDK is working properly. The console output looks similar as the one on the Developers Guide.
Now the last step, running OpenMRS locally, it starts to create the directory, but nothing happens. It never launches the web server to be tested. If I click the link, the web page loads blank. I’m still trying to figure out what I missed!