IDEA启动应用时报错:错误: 找不到或无法加载主类 @C:\Users\xxx\AppData\Local\Temp\idea_arg_filexxx

IDEA启动应用时报错,详细错误消息如下:

复制代码
C:\devel\jdk1.8.0_201\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:65267,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" -javaagent:C:\Users\03451J672\AppData\Local\JetBrains\IntelliJIdea2023.2\groovyHotSwap\gragent.jar -javaagent:C:\Users\03451J672\AppData\Local\JetBrains\IntelliJIdea2023.2\captureAgent\debugger-agent.jar=file:/C:/Users/03451J672/AppData/Local/Temp/capture4.props -Dfile.encoding=UTF-8 @C:\Users\03451J672\AppData\Local\Temp\idea_arg_file2001829779 com.ibm.banking.musemvp.parameter.ParameterApplication
Connected to the target VM, address: '127.0.0.1:65267', transport: 'socket'
错误: 找不到或无法加载主类 @C:\Users\03451J672\AppData\Local\Temp\idea_arg_file2001829779
Disconnected from the target VM, address: '127.0.0.1:65267', transport: 'socket'

Process finished with exit code 1

重新编译也不能解决问题,各种尝试,终于找到解决办法如下:

到run/debug configurations里,把对应的应用Shorten command lines由none改成JAR manifest,如图:

相关推荐
Nyarlathotep01137 分钟前
SpringBoot Starter的用法以及原理
java·spring boot
wuwen511 分钟前
WebFlux + Lettuce Reactive 中 SkyWalking 链路上下文丢失的修复实践
java
SimonKing33 分钟前
GitHub 10万星的OpenCode,正在悄悄改变我们的工作流
java·后端·程序员
Seven971 小时前
虚拟线程深度解析:轻量并发编程的未来趋势
java
雨中飘荡的记忆11 小时前
ElasticJob分布式调度从入门到实战
java·后端
考虑考虑20 小时前
JDK25模块导入声明
java·后端·java ee
_小马快跑_21 小时前
Java 的 8 大基本数据类型:为何是不可或缺的设计?
java
Re_zero1 天前
线上日志被清空?这段仅10行的 IO 代码里竟然藏着3个毒瘤
java·后端
洋洋技术笔记1 天前
Spring Boot条件注解详解
java·spring boot
程序员清风2 天前
程序员兼职必看:靠谱软件外包平台挑选指南与避坑清单!
java·后端·面试