Install Java SE
Java SE is required for running OpenMRS applications and developing OpenMRS modules. Java SE 8 is used as an example for this instruction.
Install Java SE 8 on Windows 10
- If you have another version of Java SE installed, uninstall it, and delete the system environment variables that are related to JDK and JRE.
- To create an Oracle account, follow the create account link.
- Download Java SE 8 .
- Go to the Oracle Java downloads site.
Click on the Windows header and then the click on the download link labelled x64 installer
- A pop-up will appear. In the popup, select the checkbox labeled I reviewed and accept the Oracle Technology Network License Agreement for Oracle Java SE, then click on the download button.
- The Oracle account sign in window opens. Sign in to your Oracle account. The download should now start.
- To install Java SE 8, double click the downloaded executable file file.
- When the installation is complete, verify that both JRE and JDK are configured correctly.
- Open a command line window.
At the command prompt, enter java -version, you should see output like the following (note that your version might differ):
Java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
At the command prompt, enter javac -version, you should see output like the following (note that your version might differ):
Javac 1.8.0_261
If you do not see the expected output, make sure your system environment variables for java are set up correctly. For more information, see the link below.
https://www.codejava.net/java-core/how-to-set-java-home-environment-variable-on-windows-10
Install Java SE 8 on Ubuntu
To install Java SE 8 on Ubuntu, follow these steps:
Run the update package command:
sudo apt-get update
Install the OpenJDK on it's own as a package using this command:
sudo apt-get install openjdk-8-jdk
To test the installation, type java -version, you should see the following output:
OpenJDK version "1.8.0_272" OpenJDK Runtime Environment (build 1.8.0_272-8u272-b10-0ubuntu1~20.04-b10) OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)