报错:Command line is too long. Shorten the command line and rerun.
启动 D:\xxx-boot\sender\src\main\java\org\springblade\XXXApplication.java 报错

原因:
报错:Command line is too long. Shorten the command line and rerun.
含义:启动命令行参数过长,是 IDEA 经典问题;项目依赖较多时,classpath 字符串超出系统限制,SpringBoot 项目非常常见。
启动类:XXXApplication
解决办法:
选中XXXApplication.java类,右键 More Tun/debug——>Modify Run Configuration...
- 点击界面右上角 Modify options 按钮
- 在展开的下拉菜单里,找到并点击 Shorten command line,勾选启用这个选项
- 此时界面会多出一个
Shorten command line下拉选择框,点开选择:
✅ JAR manifest
你的 JDK 版本是 18,也可以选择@argfile (Java 9+),优先推荐JAR manifest
- 点击
Apply→OK,保存配置 - 重新启动
XXXApplication,Command line is too long报错即可解决
每天多努力一点,你将会变得更好。

浙公网安备 33010602011771号