Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.16 KB

File metadata and controls

44 lines (31 loc) · 1.16 KB

Nextmv Java OR-Tools Routing

Example for running a Java Maven application on the Nextmv Platform using the OR-Tools package. We solve a vehicle routing problem.

  1. Generate a main.jar.

    mvn package
  2. Run the app.

    java -jar main.jar --input input.json

Mirror running on Nextmv Cloud locally

Docker needs to be installed.

To run the application in the same Docker image as the one used on Nextmv Cloud, you can use the following command:

mvn package && cat input.json | docker run -i --rm \
-v $(pwd):/app ghcr.io/nextmv-io/runtime/java:latest \
java -jar /app/main.jar

You can also debug the application by running it in a Dev Container. This workspace recommends to install the Dev Container extension for VSCode. If you have the extension installed, you can open the workspace in a container by using the command Dev Containers: Reopen in Container.

Next steps

  • Open main.py and modify the model.
  • Visit our docs and blog. Need more assistance? Contact us!