#!/usr/bin/env bash
JAVA_MAJOR_VERSION=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed 's/^1\.//' | cut -d'.' -f1)
if [ $((JAVA_MAJOR_VERSION)) -ge 17 ]; then
  java -jar can-shell-2.0.3-RELEASE-exec.jar
else
  echo "Java 17 or higher is required. See https://docs.clevermaps.io/docs/upgrading-to-java-17"
fi
