Bazel is a powerful and open-source build system developed at Google. It is designed to build software projects in a fast and efficient manner. This tutorial will guide you through the process of installing Bazel on Windows 10.
Step 1 - Install Java Development Kit (JDK)
As Bazel requires JDK 8 or later, you need to make sure that you have installed JDK on your machine. If you haven't installed yet, follow the below steps to install JDK:
- Go to the Java SE Development Kit 8 Downloads page.
- Download the Java SE Development Kit 8u261 for Windows x64. (Note: If your system architecture is different, download the relevant package.)
- Open the downloaded JDK executable file (e.g., jdk-8u261-windows-x64.exe)
- Follow the installation instructions on the wizard.
Step 2 - Download and extract Bazel package
- Go to the Bazel Releases page.
- Download the latest version of Bazel for Windows.
- Extract the downloaded package into a directory of your choice. (e.g., C:\Program Files\Bazel)
Step 3 - Add Bazel to Environment Variable
To use Bazel from any directory in Windows, you need to add the bazel executable to the system's PATH
environment variable. To do so:
- Right-click the Start menu button, and select "System".
- Click on "Advanced system settings" in the left pane.
- In the System Properties window that opens, click on the "Environment Variables" button at the bottom.
- Under "System Variables", scroll down and find the
PATH
variable. Click on "Edit".
- Click on "New" at the end of the "Variable value" field.
- Type in the full path of the bin directory where the Bazel executable file resides. (e.g., C:\Program Files\Bazel\bin)
- Click "OK", "OK", and "OK" to close all the windows.
Step 4 - Test Bazel Installation
To verify that Bazel is installed correctly, open a command prompt and run the following command:
bazel version
If Bazel is installed and configured correctly, the output will be similar to the following:
bazel 2.2.0
...
Congratulations! You have successfully installed Bazel on Windows 10. You may start building software projects with Bazel from now on.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!