- Mastering Microservices with Java 9(Second Edition)
- Sourabh Sharma
- 112字
- 2021-07-02 21:54:46
Executing with the Java command
Please make sure that Java and JAVA_HOME is set to Java 9 before executing the following commands.
Take a look at the following steps:
- To build the JAR file, perform the mvn clean package command from the Command Prompt from the parent project root directory (6392_chapter2). Here, clean and package are Maven goals:
mvn clean package
- It creates the JAR files in a respective target directory. We'll execute the JAR files generated in the 6392_chapter2\rest\target directory. A JAR file can be executed using the following command:
java -jar rest\target\rest-1.0-SNAPSHOT-exec.jar
Please make sure you execute the JAR file having a postfix exec as shown in the preceding command.