Skip to content

Setting up the TMC CLI JAR

Henrik Lindberg edited this page Oct 1, 2017 · 1 revision

After completing the instructions on this page you should have a JAR file with a path something like ./tmc-langs-*/tmc-langs-cli/target/tmc-langs-cli-*.jar and an environment variable $CLI_JAR which you can use to refer to the file. This means you can run TMC-related tasks from the command line with commands such as java -jar "$CLI_JAR" help.

I'm assuming your working directory is ~/tmc and that it contains the tmc-langs sources in a zip file such as tmc-langs-master.zip. The environment variable $JAVA_HOME should be set to something like ~/jdk1.8.0_144/jre or wherever you have JRE installed.

Unzip the directory and cd into it with unzip -q tmc-langs-master.zip && cd tmc-langs-master. Build tmc-langs with mvn clean package -DskipTests. Set an environment variable and test that everything worked out with the commands export CLI_JAR="$HOME/tmc/tmc-langs-master/tmc-langs-cli/target/tmc-langs-cli-0.7.7-SNAPSHOT.jar" and java -jar "$CLI_JAR" help. If you see a help message, $CLI_JAR is working.