MidPoint is a Java application therefore it requires Java platform to run on. MidPoint requires at least Java 8. You can use OpenJDK Recommended platform to run MidPoint OpenJDK 11 wich might be already installed on your system of you can download JDK from Oracle.. JDK 8 may be used with midPoint 4.0.x, but it is a deprecated platform. JDK 11 is strongly recommended.
JAVA_HOME environment variable should point to the Java installation path.
MidPoint 3.7 is supported only on Java 8 platforms. MidPoint supported both Java 7 and Java 8 for several years. The support for Java 7 was deprecated in midPoint 3.4.1 and it was removed in midPoint 3.5.
Prepare midPoint software
Download midPoint distribution from the latest build from: https://evolveum.com/download/master/
All that remains is to start midPoint server up: