@shashikumar
NiFi only requires the the Java Runtime Environment (JRE). Latest versions of NiFi support both Java 8 or Java 11:
system_requirements
The JDK contains, in addition to the JRE, additional development tools like compilers, debuggers, etc. These may be useful to you depending on whether or not you intend to compile java code within your dataflow (not a requirement of any components like processors, controller services, reporting tasks, etc included with NiFi) or create your own custom NiFi components.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt