The open-source variant is free to use in production, while there is a fee for organizations using the commercially licensed JDK in production. … If you want long-term support from Oracle for a Java release you have to pay for it by using the Oracle JDK build.
Does Java cost money now?
The current version of Java – Java SE 9 as well as Java SE 8 – is free and available for redistribution for general purpose computing. Java SE continues to be available under the Oracle Binary Code License (BCL) free of charge.
What is the free version of Java?
Just Java SE 8 JDK 8u202 and earlier versions are free for development and production deployment.