= Quickstart

You can get up and running with OptaWeb Vehicle Routing in just a few steps.
In this chapter you will download the OptaWeb Vehicle Routing distribution archive containing a binary build of OptaWeb Vehicle Routing.
You will use a Bash script to run the binary without having to build the project.

// TODO make this a prerequisite of build procedure
//==== Internet access
//
//You need internet access when you build and run the application.
//The application source code depends on Maven and NPM packages that will be downloaded during build.
//When the application runs it uses third party, public services such as link:https://www.openstreetmap.org/about[OpenStreetMap]
//to display map tiles and provide search results.

[[install-java]]
== Install Java 11 or higher

*Java SE 11 or higher* must be installed on your system before you can use OptaWeb Vehicle Routing.

NOTE: It is recommended that you install Java SE Development Kit (JDK) because it is necessary in order to build OptaWeb Vehicle Routing from the source.
However, if you have a binary distribution of OptaWeb Vehicle Routing, you only need the Java SE Runtime Environment (JRE).

.Procedure
. To verify the current Java installation, enter the following command:
+
[source,shell]
----
java -version
----

. If necessary, install OpenJDK 11.
* To install OpenJDK 11 on Fedora, enter the following command:
+
[source,shell]
----
sudo dnf install java-11-openjdk-devel
----

* To install OpenJDK on other platforms, follow instructions at https://openjdk.java.net/install/.

== Download distribution archive

Download the OptaWeb Vehicle Routing distribution archive, available from the OptaPlanner website, to quickly evaluate OptaWeb Vehicle Routing without having to set up build tools.

NOTE: If you want to modify OptaWeb Vehicle Routing and build it yourself or contribute to upstream, see <<development-guide#development-guide>>.

.Procedure
. Go to https://www.optaplanner.org/download/download.html
and click the *OptaWeb Vehicle Routing* tab.
. Click *Download OptaWeb Vehicle Routing {revnumber}*.
+
.OptaPlanner download page
image::download.png[OptaPlanner download page at www.optaplanner.org,align="center"]
+
. Extract the downloaded distribution ZIP file.
The archive contains source files and a binary build of OptaWeb Vehicle Routing as well as the OptaWeb Vehicle Routing documentation.
+
.Content of the OptaWeb Vehicle Routing distribution archive
image::distribution.png[Content of the OptaWeb Vehicle Routing distribution archive,align="center"]

== Run OptaWeb Vehicle Routing

After you download OptaWeb Vehicle Routing and extract the distribution archive, use the `runLocally.sh` script to run it.

NOTE: If the standalone JAR is not part of the distribution, build the project from source by using the `sources` directory.
You can use the `sources` directory inside the distribution as if you have cloned the source repository from GitHub.
// TODO build instructions

NOTE: If Bash is not available on your system, continue to <<run-noscript#run-noscript>>.

.Prerequisites
* Internet access is available.
When OptaWeb Vehicle Routing runs it uses third-party public services such as link:https://www.openstreetmap.org/about[OpenStreetMap] to display map tiles and provide search results.
* Java 11 or higher is installed.
* OptaWeb Vehicle Routing distribution archive is downloaded and extracted.

.Procedure
Enter the following command:

[source,bash]
----
./bin/runLocally.sh
----

The script will download an OSM file that is needed to work with the sample data set that is included with the application.
The script also has an interactive mode you can use to download additional regions.
See <<run-locally#run-locally-sh>> to learn more about the script.
