Java compatibility issue with Talend

I installed Talend Open Studio for Data Integration 8.0.1. Initially, I had java version 8 of JRE installed and I was getting the error message that ‘version 1.8.0_321 of the JVM is not suitable for this product. Version: 11 or greater is required’. So I installed java version 11 of jdk and now I get the error message ‘Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run TOS_DI-win-x86_64. No Java virtual machine was found after searching the following locations: C:Program FilesJavajre1.8.0_321bin’.