If you try to download the latest Java, you may be scared by the following warning:
The question: is Java not free anymore? Dec-2018 issue of Java Magazines explains the changes in Oracle Java Licensing policy. In particular, it says: “If you are accustomed to getting Java SE binaries for free, you can simply continue doing so with OpenJDK builds from Oracle avaiable at jdk.java.net“. However, this link tells you: “This page provides production-ready open-source builds of the Java Development Kit, version 11.0.2, an implementation of the Java SE 11.0.2 Platform under the GNU General Public License, version 2, with the Classpath Exception.” But GNU GPL license requires your application to also be open-sourced or you need to use the Commercial builds of JDK 11.0.2 from Oracle under a non-open-source license.
Oracle also says that Java SE 8 “remains free of charge for general purpose desktop and server use and is available under the Oracle Binary Code License (BCL) at https://www.oracle.com/javadownload.” However, Oracle warns that it “will not post further updates of Java SE 8 to its public download sites for commercial use after January 2019. Customers who need continued access to critical bug fixes and security fixes as well as general maintenance for Java SE 8 or previous versions can get long term support through Oracle Java SE Subscription or Oracle Java SE Desktop Subscription.”