Install Java SE
Java SE 8 is required for running OpenMRS applications and developing OpenMRS modules.
Install Java SE 8 on Windows 10
The instructions are for the Windows 64 bit system. If your Windows system is 32bit, download and install the jdk-8u261-windows-i586.exe instead.
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 .
a) Go to the Oracle JAVA SE site.
b) Right click on jdk-8u261-windows-x64.exe, select Open link in incognito window.
If you click the jdk-8u261-windows-x64.exe link directly, the file will not download.
c) In the new browser window click jdk-8u261-windows-x64.exe.
A popup displays.
d) In the popup, select the checkbox labeled I reviewed and accept the Oracle Technology Network License Agreement for Oracle Java SE, then select the green button to download jdk.
The Oracle account sign in window opens.
e) Sign in to your Oracle account.
Download starts.
4.To install Java SE 8, double click the downloaded jdk-8u261-windows-x64.exe file.
5. When the installation is complete, verify that both JRE and JDK are configured correctly.
6. Open a command line window.
7. At the command prompt, enter java -version, you should see the following output:
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)
8. At the command prompt, enter javac -version, you should see the following output:
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
You can 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: