DEV Community

Cover image for How I Installed Apache NiFi 2.11.0 on Windows with JDK 25 and Git Bash
Jules AMENOUSSI
Jules AMENOUSSI

Posted on

How I Installed Apache NiFi 2.11.0 on Windows with JDK 25 and Git Bash

Installing Apache NiFi on Windows can be straightforward, but I encountered an interesting issue when I tried to start NiFi using Git Bash.

Here is how I installed Apache NiFi 2.11.0 with JDK 25 and solved the BootstrapProcess error.

Installing Apache NiFi on Windows looks straightforward: download the binary distribution, extract it, configure Java, and start NiFi.

That's exactly what I expected.

However, while installing Apache NiFi 2.11.0 on Windows with JDK 25 and Git Bash, I encountered an interesting BootstrapProcess error.

This article documents the complete installation process, the problem I encountered, how I investigated it, and the solution that worked for me.

My Environment

Here was my setup:

  • Windows
  • Git Bash
  • Apache NiFi 2.11.0
  • JDK 25.0.4.1

My Java installation was located at:

C:\Program Files\Java\jdk-25.0.4.1
Enter fullscreen mode Exit fullscreen mode

I verified Java with:

java -version
Enter fullscreen mode Exit fullscreen mode

which returned:

java version "25.0.4.1"
Enter fullscreen mode Exit fullscreen mode

I also configured:

JAVA_HOME=C:\Program Files\Java\jdk-25.0.4.1
Enter fullscreen mode Exit fullscreen mode

Downloading and Extracting NiFi

I downloaded the Apache NiFi 2.11.0 binary distribution and extracted it.

The extracted directory looked like this:

nifi-2.11.0/
├── bin/
├── conf/
├── docs/
├── extensions/
├── lib/
├── logs/
└── python/
Enter fullscreen mode Exit fullscreen mode

I then moved into the bin directory:

cd ~/Downloads/nifi-2.11.0-bin/nifi-2.11.0/bin
Enter fullscreen mode Exit fullscreen mode

The First Problem

Since Git Bash provides a Unix-like environment, I initially tried:

./nifi.sh status
Enter fullscreen mode Exit fullscreen mode

NiFi correctly detected Java and the NiFi installation directory:

JAVA_HOME=C:\Program Files\Java\jdk-25.0.4.1
NIFI_HOME=/c/Users/PC/Downloads/nifi-2.11.0-bin/nifi-2.11.0
Enter fullscreen mode Exit fullscreen mode

But then I received:

Error: Could not find or load main class org.apache.nifi.bootstrap.BootstrapProcess
Caused by: java.lang.ClassNotFoundException:
org.apache.nifi.bootstrap.BootstrapProcess
Enter fullscreen mode Exit fullscreen mode

At first, I suspected that Java was incorrectly installed.

But Java itself was working.

So I started investigating instead of reinstalling everything.

Checking the NiFi Bootstrap JAR

The first thing I checked was the bootstrap directory:

ls -la ../lib/bootstrap
Enter fullscreen mode Exit fullscreen mode

I found:

nifi-bootstrap-2.11.0.jar
Enter fullscreen mode Exit fullscreen mode

So the required JAR was definitely present.

But I still wanted to verify that the missing class actually existed inside the JAR.

I ran:

jar tf ../lib/bootstrap/nifi-bootstrap-2.11.0.jar | grep BootstrapProcess
Enter fullscreen mode Exit fullscreen mode

The result was:

org/apache/nifi/bootstrap/BootstrapProcess.class
Enter fullscreen mode Exit fullscreen mode

This was an important clue.

The class existed.

The JAR existed.

Java was installed correctly.

So the problem was likely related to how the shell script was constructing or passing the classpath.

Testing the Classpath Directly

I then tested the JAR directly:

java -cp "../lib/bootstrap/*" org.apache.nifi.bootstrap.BootstrapProcess
Enter fullscreen mode Exit fullscreen mode

Interestingly, Java did not report a ClassNotFoundException.

This confirmed that Java could access the NiFi bootstrap classes correctly when the classpath was specified directly.

That made the problem with nifi.sh on Git Bash/Windows even more apparent.

Trying the Windows Script

Looking at the NiFi bin directory, I noticed that NiFi provides both:

nifi.sh
nifi.cmd
Enter fullscreen mode Exit fullscreen mode

Since I was running Windows, I decided to use the Windows-specific script.

I ran:

./nifi.cmd status
Enter fullscreen mode Exit fullscreen mode

This time I got:

Command Status [SUCCESS] HTTP 200
Status: UP
Enter fullscreen mode Exit fullscreen mode

That was the solution.

Starting NiFi

I started NiFi with:

./nifi.cmd start
Enter fullscreen mode Exit fullscreen mode

The output indicated that the application process had started:

Application Process [29800] started
Bootstrap Process Running
Enter fullscreen mode Exit fullscreen mode

The process ID may be different on your machine.

I then checked the status:

./nifi.cmd status
Enter fullscreen mode Exit fullscreen mode

and received:

Command Status [SUCCESS] HTTP 200
Status: UP
Enter fullscreen mode Exit fullscreen mode

Apache NiFi was running.

Accessing the NiFi UI

I opened:

https://localhost:8443/nifi
Enter fullscreen mode Exit fullscreen mode

The NiFi login page appeared successfully.

So the installation was complete.

Finding the Initial Credentials

For the first login, NiFi generated credentials automatically.

I searched the application log:

grep -i "Generated username\|Generated password" ../logs/nifi-app.log
Enter fullscreen mode Exit fullscreen mode

The generated credentials allowed me to log into the NiFi Web UI.

Remember:

Never publish your generated password in a public GitHub repository or article.

The Main Lesson

The biggest lesson from this installation was simple:

On Windows, use the Windows-specific NiFi script: nifi.cmd.

If you are using Git Bash, it can be tempting to use:

./nifi.sh
Enter fullscreen mode Exit fullscreen mode

because Git Bash supports Unix shell scripts.

But NiFi provides:

nifi.cmd
Enter fullscreen mode Exit fullscreen mode

specifically for Windows.

In my case, nifi.sh produced:

Could not find or load main class
org.apache.nifi.bootstrap.BootstrapProcess
Enter fullscreen mode Exit fullscreen mode

while:

./nifi.cmd status
Enter fullscreen mode Exit fullscreen mode

worked correctly.

Final Commands

These are the commands I now use to manage NiFi:

Start

./nifi.cmd start
Enter fullscreen mode Exit fullscreen mode

Check status

./nifi.cmd status
Enter fullscreen mode Exit fullscreen mode

Stop

./nifi.cmd stop
Enter fullscreen mode Exit fullscreen mode

Follow logs

tail -f ../logs/nifi-app.log
Enter fullscreen mode Exit fullscreen mode

Open the Web UI

https://localhost:8443/nifi
Enter fullscreen mode Exit fullscreen mode

Quick Installation Summary

The complete process is:

# Check Java
java -version

# Check JAVA_HOME
echo $JAVA_HOME

# Go to NiFi
cd ~/Downloads/nifi-2.11.0-bin/nifi-2.11.0/bin

# Start NiFi
./nifi.cmd start

# Check status
./nifi.cmd status
Enter fullscreen mode Exit fullscreen mode

Then open:

https://localhost:8443/nifi
Enter fullscreen mode Exit fullscreen mode

Troubleshooting Checklist

If NiFi does not start, check these things first:

1. Is Java installed?

java -version
Enter fullscreen mode Exit fullscreen mode

2. Is JAVA_HOME correct?

echo $JAVA_HOME
Enter fullscreen mode Exit fullscreen mode

It should point to your JDK installation.

3. Does the bootstrap JAR exist?

ls -la ../lib/bootstrap
Enter fullscreen mode Exit fullscreen mode

Look for:

nifi-bootstrap-2.11.0.jar
Enter fullscreen mode Exit fullscreen mode

4. Does the bootstrap class exist?

jar tf ../lib/bootstrap/nifi-bootstrap-2.11.0.jar | grep BootstrapProcess
Enter fullscreen mode Exit fullscreen mode

Expected:

org/apache/nifi/bootstrap/BootstrapProcess.class
Enter fullscreen mode Exit fullscreen mode

5. Are you using the correct script on Windows?

Try:

./nifi.cmd status
Enter fullscreen mode Exit fullscreen mode

instead of:

./nifi.sh status
Enter fullscreen mode Exit fullscreen mode

Conclusion

Apache NiFi 2.11.0 was successfully installed and started on Windows using JDK 25.0.4.1 and Git Bash.

The most useful part of the troubleshooting process was not simply finding a command that worked, but understanding why the original command failed.

The important distinction is:

Linux/macOS → nifi.sh
Windows     → nifi.cmd
Enter fullscreen mode Exit fullscreen mode

If you are installing NiFi on Windows and encounter a BootstrapProcess classpath error while using Git Bash, check the bootstrap JAR and try the Windows-specific nifi.cmd script.

I hope this saves someone else a little time.


Resources

If this guide helped you, feel free to share it with someone learning Apache NiFi.

Full Installation Guide

I also created a GitHub repository containing the complete installation guide and troubleshooting steps:

[Apache NiFi 2.11.0 on Windows — GitHub]
https://github.com/AMENOUSSI/apache-nifi-windows-installation-guide.git

Top comments (0)