How to Install Gradle in Windows 11
In this article
Installing Gradle on Windows 11 is straightforward and requires just a few manual steps. You’ll need to download the distribution, extract it, and configure your environment variables properly.
What You'll Need
- Windows 11 operating system
- Administrator access to your computer
- Internet connection
- Web browser (Chrome, Edge, Firefox, etc.)
Step-by-Step
- Visit the official Gradle website: Go to https://gradle.org/releases/ in your web browser.
- Select the latest stable version:
On the releases page, locate the "Latest stable release" section. Click on the "Binary-only distribution" link to download the zip file of Gradle. For instance, you might see a name like
gradle-8.5-bin.zip. - Download the ZIP file: After clicking the download link, your browser will begin downloading the archive. Save it to a known location such as your Downloads folder.
- Extract the ZIP archive:
Navigate to where you saved the file and right-click it. Select "Extract All..." or use a tool like 7-Zip or WinRAR to unzip it. Choose a dedicated folder like
C:\Gradleto store the extracted contents. - Open System Properties:
Press Win + R, type
sysdm.cpl, and press Enter. Alternatively, right-click the Start button and select "System". Then click "Advanced system settings" under "Related settings". - Access Environment Variables: In the System Properties dialog box, click the "Environment Variables" button located at the bottom.
- Edit PATH variable:
Under "System Variables", scroll down and find
Path. Select it and click "Edit...". Click "New" and add the full path to thebindirectory inside your Gradle installation folder. For example, enterC:\Gradle\gradle-8.5\bin. - Add GRADLE_HOME variable (optional):
Still in the Environment Variables window, click "New" under "System Variables". Set the variable name to
GRADLE_HOMEand the value to your Gradle root folder, e.g.,C:\Gradle\gradle-8.5. This helps some tools recognize Gradle more easily. - Confirm changes: Click "OK" on all dialogs to save your changes. Restart any open Command Prompt or PowerShell windows to apply the new environment variables.
- Verify installation:
Open a new Command Prompt or PowerShell window and run the command
gradle --version. You should see output showing the Gradle version and Java details.
Common Mistakes
- Not restarting the command prompt after updating environment variables.
- Using incorrect paths when adding entries to PATH or setting GRADLE_HOME.
- Installing Gradle in a restricted folder like Program Files without administrator rights.
- Forgetting to include the
binsubdirectory in the PATH variable.
Tips
- Use a consistent naming convention for your Gradle directories (e.g., always append version numbers).
- If using multiple projects, consider installing Gradle globally rather than per-project.
- Always verify your installation by running
gradle --versionafter setup. - Keep backups of previous Gradle installations in case you need to roll back changes.
Troubleshooting
If Gradle isn’t recognized, try these fixes:
- Ensure that the path you added to PATH includes the
bindirectory, not just the root folder. - Reboot your system to ensure all environment changes take effect.
- Check if another version of Gradle is installed elsewhere and causing conflicts.
- Run the command prompt as Administrator to ensure full permissions.
- Try double-checking the path in the Environment Variables editor—spaces or typos can break the configuration.
Frequently Asked Questions
How do I know if Gradle is installed correctly?
Run gradle --version in a command prompt. It should return the Gradle version along with the Java version used.
Can I install Gradle manually instead of using a package manager?
Yes, manual installation is perfectly valid and commonly done on Windows. Just download the binary distribution and follow the configuration steps.
Does Gradle require Java to be installed?
Yes, Gradle depends on Java. Make sure you have Java JDK or JRE installed and available in your environment variables before installing Gradle.
Where should I install Gradle on Windows 11?
A good practice is to install Gradle outside of system folders like Program Files to avoid permission issues. A common location is C:\Gradle.
What happens if I don’t set GRADLE_HOME?
Gradle will still work if you only update PATH. However, some IDEs or scripts may expect the GRADLE_HOME variable for proper functioning.
Is it safe to download Gradle from the official site?
Yes, the official site provides verified builds and signatures. Always download from https://gradle.org/releases/ to ensure you get a legitimate version.