Installing OR-Tools for Java from Binary on Windows

  • This guide provides instructions for installing OR-Tools for Java on Windows 10 64-bit systems using Visual Studio 2022.

  • Prerequisites include Microsoft Visual C++ Redistributable for Visual Studio 2022 (x64), a 64-bit Java JDK 8.0 or later, and a 64-bit Maven installation.

  • Installation involves downloading and extracting the OR-Tools binary distribution for Visual Studio 2022 and validating the installation by running the provided test command.

  • Successful installation enables users to proceed with utilizing OR-Tools for their Java projects, as detailed in the linked introductory resources.

 Introduction

This guide explains how to install OR-Tools for Java on Windows.

Although these instructions might also work on other Windows variants, we have only tested them on machines meeting the following requirements:

Windows 10 64-bit (x86_64) with:

  • Microsoft Visual Studio Enterprise 2022
  • Microsoft Visual Studio Community 2022 Preview 2 or above

Prerequisites

The following sections describe the prerequisites for installing OR-Tools.

Microsoft Visual C++ Redistributable

You must have the Microsoft Visual C++ Redistributable for Visual Studio 2022 (select the x64 version) installed on your computer, since OR-Tools library for Java is a wrapper for the C++ native library.

Java JDK

You must also have a Java JDK 64 bit, version 8.0 or later installed.

You can find more details here.

Maven

You must also have a Maven 64 bit installed.

You can find more details here.

Take the following steps to install the OR-Tools library for Java:

Download and extract the binary distribution for your system:

Validate your installation

To test your Java installations, open a x64 Native Tools Command Prompt and navigate to the directory where you unpacked the binary distribution. Then enter the following command:

tools\make test

This runs a selection of examples for OR-Tools. If all the examples run successfully, you are ready to get started with OR-Tools.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-03-18 UTC.