[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-05 UTC."],[[["\u003cp\u003eThis guide provides step-by-step instructions for setting up and running OR-Tools in Java on Windows 10 64-bit using Maven.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, ensure you have prerequisites like Microsoft Visual C++ Redistributable, Java JDK 8 or later, and Maven installed.\u003c/p\u003e\n"],["\u003cp\u003eYou can integrate OR-Tools into your Maven project by adding a dependency to your project's \u003ccode\u003epom.xml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eExample code is available in the \u003ccode\u003ejava_or-tools\u003c/code\u003e repository on GitHub and can be built and run using Maven commands.\u003c/p\u003e\n"],["\u003cp\u003eAfter successfully running the example, you can explore further functionalities and features of OR-Tools for your Java applications.\u003c/p\u003e\n"]]],["This guide details how to use OR-Tools in Java. Key actions include installing prerequisites: the Microsoft Visual C++ Redistributable (x64), a 64-bit Java JDK (8.0+), and 64-bit Maven. To integrate OR-Tools, add its artifact dependency to the project's pom.xml file. Download or clone the `java_or-tools` repository, navigate to its directory, and then build the project with `mvn compile -B`. Finally, execute the example by running `mvn exec:java`.\n"],null,["# Using OR-Tools Maven for Java\n\nIntroduction\n------------\n\nThis guide gets you started with OR-Tools in Java with a simple working\nexample.\n\nAlthough these instructions might also work on other Windows variants, we\nhave only tested them on machines meeting the following requirements:\n\n\nWindows 10 64-bit (x86_64) with:\n\n- Microsoft Visual Studio Enterprise 2022\n- Microsoft Visual Studio Community 2022 Preview 2 or above\n\n\u003cbr /\u003e\n\nPrerequisites\n-------------\n\nThe following sections describe the prerequisites for installing OR-Tools.\n\n### Microsoft Visual C++ Redistributable\n\nYou must have the\n[Microsoft Visual C++ Redistributable for Visual Studio 2022](https://visualstudio.microsoft.com/downloads/?q=Visual+C%2B%2B+Redistributable+for+Visual+Studio) (select the x64 version) installed\non your computer, since OR-Tools library for Java is a wrapper for the\nC++ native library.\n\n### Java JDK\n\nYou must also have a Java JDK 64 bit, version 8.0 or later installed.\n\nYou can find more details\n[here](https://java.com/en/download/help/download_options.xml).\n\n### Maven\n\nYou must also have a Maven 64 bit installed.\n\nYou can find more details [here](https://maven.apache.org/download.cgi).\n\nInstalling with Maven\n---------------------\n\nTo include OR-Tools in your Maven application, add a dependency on its artifacts\nto your project's pom.xml file. For example, \n\n \u003c!-- https://mvnrepository.com/artifact/com.google.ortools/ortools-java --\u003e\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.google.ortools\u003c/groupId\u003e\n \u003cartifactId\u003eortools-java\u003c/artifactId\u003e\n \u003cversion\u003e9.12.4544\u003c/version\u003e\n \u003c/dependency\u003e\n\nGet the Java example code\n-------------------------\n\nThe example code is located in the\n[java_or-tools](https://github.com/or-tools/java_or-tools) repository.\n\n1. [Download the repository as a zip file](https://github.com/or-tools/java_or-tools/archive/v9.12.zip)\n and extract it, or clone the repository:\n\n git clone -b v9.12 --depth 1 https://github.com/or-tools/java_or-tools\n\n2. Change to the examples directory:\n\n cd java_or-tools\n\nBuild the example\n-----------------\n\nFrom the `java_or-tools` directory:\n\nBuild the project using:\n\n\n mvn compile -B\n\n\u003cbr /\u003e\n\nRun the example\n---------------\n\nFrom the `java_or-tools` directory:\n\nRun the binary using:\n\n\n mvn exec:java\n\n\u003cbr /\u003e\n\nCongratulations! You've just run an application with OR-Tools, you are ready to\n[get started with OR-Tools](../../introduction/java)."]]