# shellcheck shell=dash

xrc java
___x_cmd_jar___main(){
    [ "$#" -gt 0 ] ||   set -- --help

    local op="$1";      shift
    case "$op" in

        -h|--help)      ___x_cmd help -m jar ;;
        *.jar)          ___x_cmd_jar_run "$op" "$@" ;;
        build)          ;;  # build the jar
        ls)             ;;
        uz)             ;;  # unzip the jar
        extract)        ;;  # extract some files from the jar
        run)            ___x_cmd_jar_run "$@" ;;  # run the jar

        *)              ___x_cmd help -m jar ;;
    esac
}

___x_cmd_jar_run(){
    ___x_cmd_java -jar "$@"
}
