How to Download and Set Up Apache NiFi for Java 11 on Windows
To run Apache NiFi on Windows with Java 11, you need to use a NiFi 1.x version from 1.12.0 onward, as those 1.x versions support Java 11 — do not use NiFi 2.x for this setup, because NiFi 2.x requires Java 21. Download the correct Windows binary from the Apache NiFi website, install Java 11 and configure your environment variables properly. With these steps, you can install, configure, and run NiFi smoothly on your Windows machine using Java 11.
What version of Apache NiFi supports Java 11 on Windows?
Apache NiFi supports Java 11 starting with version 1.12.0. Versions before 1.12.0 were designed for Java 8 and might not run correctly on Java 11 due to changes in the Java platform, including deprecated APIs and the module system introduced in Java 9. To avoid runtime errors or unexpected behavior, always use a NiFi 1.x release (1.12.0 or a later 1.x version, not NiFi 2.x) when running on Java 11 on Windows.
Where do I download Apache NiFi for Windows?
Download Apache NiFi from the official Apache NiFi website's download section. Choose a NiFi 1.x release — version 1.12.0 or a later 1.x version — to ensure Java 11 compatibility; NiFi 2.x requires Java 21. Look for binary releases named like "nifi-x.y.z-bin.zip" where x.y.z is the version number. These ZIP files contain the prebuilt Windows-compatible binaries. Avoid source code downloads unless you plan to build NiFi yourself. Save the ZIP file to a folder where you want NiFi installed, for example, C:\nifi.
How do I install and configure Java 11 on Windows for NiFi?
- Download a Java 11 JDK for Windows from a trustworthy source such as Eclipse Adoptium (Temurin) or Oracle.
- Run the installer and follow the prompts to install Java 11.
- Set the JAVA_HOME environment variable to the root directory of your Java 11 JDK installation, for example,
C:\Program Files\Java\jdk-11. - Add
%JAVA_HOME%\binto your system PATH environment variable.
You can set these variables via System Properties > Environment Variables or using PowerShell commands. This setup ensures NiFi uses Java 11 when starting.
What are the step-by-step instructions to install and run NiFi on Windows with Java 11?
- Download the NiFi ZIP archive for a 1.x version (1.12.0 or a later 1.x version) and save it to your chosen directory, such as C:\nifi.
- Extract the ZIP file using Windows Explorer or a tool like 7-Zip.
- Open a command prompt and navigate to the extracted NiFi folder, for example,
C:\nifi\nifi-1.12.0. - Confirm that JAVA_HOME is set correctly and points to your Java 11 JDK.
- (Optional) Edit
conf\nifi.propertiesto customize settings like ports or directories if the defaults do not fit your needs. - Start NiFi by running the
run-nifi.batscript inside thebinfolder.
cd C:\nifi\nifi-1.12.0\bin
run-nifi.bat- Wait for the startup logs to confirm NiFi launched successfully.
- Access the NiFi web UI at https://localhost:8443/nifi on current NiFi builds, using the generated single-user username and password written to logs/nifi-app.log on first startup.
NiFi should now be running on Java 11 without errors.
How can I verify NiFi is running with Java 11 on Windows?
To verify NiFi is using Java 11, check the nifi-app.log file in the logs directory of your NiFi installation. The log entries at startup include the Java runtime version, which should indicate 11.x.x. Alternatively, when you start NiFi from the command prompt, watch the console output for Java version details. The NiFi UI’s System Diagnostics or About page may also display the Java version. If NiFi starts without errors and the logs show Java 11, your setup is correct.
What common problems should I watch out for during installation?
- Ensure your JAVA_HOME environment variable points to your Java 11 JDK, not an older Java version. Using an incorrect Java version can cause NiFi to fail or behave unexpectedly.
- Add
%JAVA_HOME%\binto your PATH so NiFi scripts can find the Java executable. - Run NiFi commands with appropriate permissions. Insufficient rights may prevent NiFi from binding to ports or writing logs.
- Be careful when editing
nifi.properties, especially Java options and port settings. Incorrect changes can prevent NiFi from starting. - Always back up configuration files before making changes, so you can restore them if needed.
Following these points helps avoid common setup issues.
Conclusion
Running Apache NiFi on Windows with Java 11 is straightforward when you use a NiFi 1.x version (1.12.0 or a later 1.x version) and properly configure your Java environment variables. After installation, check the logs to confirm NiFi runs on Java 11 without errors. This setup lets you leverage NiFi’s data flow capabilities on a modern Java runtime with reliable compatibility and performance.
Frequently Asked Questions
Can I use NiFi versions older than 1.12.0 with Java 11?
Older NiFi versions target Java 8 and may not work reliably with Java 11 due to platform changes. It’s recommended to use a NiFi 1.x release (1.12.0 or a later 1.x version) for Java 11 support.
Do I need to uninstall previous Java versions before installing Java 11?
You don’t need to uninstall older Java versions, but JAVA_HOME must point to Java 11 and your PATH should prioritize its bin directory to avoid conflicts.
How do I change the NiFi web UI port if 8443 is in use?
Edit the `conf\nifi.properties` file and change the `nifi.web.https.port` property to an available port number. Then restart NiFi for the change to take effect.
Is there a Windows service version of NiFi for easier startup?
NiFi doesn’t include a native Windows service installer. However, you can use third-party tools or scripts to run NiFi as a Windows service if needed.