[b] Step 1: Add in your pom.xml
<plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2</version> <configuration> <archive> <manifest> <mainClass>cn.com.threetcloud.agent.server.BrokerServer</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef> jar-with-dependencies </descriptorRef> </descriptorRefs> </configuration> </plugin>
Step 2: CMD enters its own project folder to perform the mvn assembly:assembly operation
, then the operation steps are
2: d: Enter
4: cd test Enter
Step 3: CMD runs the jar file just exported through the java command, Generally, after exporting, under the target folder of your own project,
the operation steps are
2: d: Enter
4: cd test Enter
5: java -jar agent-server-0.0.1-jar-with-dependencies.jar Enter
answer : Because you can't double-click to see what went wrong, including the information output by our console, you can display these information on a black screen after running the java command.