您的位置:首页 >Java中如何使用Maven打包并执行jar文件?
发布于2023-05-08 阅读(0)
扫一扫,手机访问
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins>
java -jar hello-world-0.0.1-SNAPSHOT.jar


java -classpath hello-world-0.0.1-SNAPSHOT.jar com.demo.controller.HelloController
public class HelloController {
public static void main(String[] args) {
for (int x = 0; x < 100 ; x++) {
System.out.println("this is " +i+ " test");
}
}在一秒钟内看到本质的人和花半辈子也看不清一件事本质的人,自然是不一样的命运。
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
1
2
3
7
9