Installing OR-Tools for Java from Binary on Windows

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 2017 or Visual Studio Community 2017

Visual Studio

To install and run OR-Tools on Windows, you must have Visual Studio 2017 or later installed on your computer with the C++ toolset for Visual Studio. You can find more details here.

To build OR-Tools programs from the command line you must use a x64 Native Tools Command Prompt (not the Developer Command Prompt). You can find more details here.

Java JDK

You must also have a Java JDK 64 bit, version 8.0 or later installed. You can find more details here

Installing OR-Tools

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

Download and extract the binary distribution for your system:

FlatZinc binary distributions

FlatZinc is a solver input language understood by a wide range of solvers.
OR-Tools also provides binary distributions with FlatZinc support:

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_java

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

Send feedback about...