相关推荐recommended
Error running ‘XXX‘: Command line is too long. Shorten command line for XXXor also for Spring Boot
作者:mmseoamin日期:2023-12-13

一、前言

启动服务时报错Error running ‘XXX’: Command line is too long. Shorten command line for XXXor also for Spring Boot

Error running ‘XXX‘: Command line is too long. Shorten command line for XXXor also for Spring Boot,在这里插入图片描述,第1张

二、解决办法

Error running ‘XXX‘: Command line is too long. Shorten command line for XXXor also for Spring Boot,在这里插入图片描述,第2张

Error running ‘XXX‘: Command line is too long. Shorten command line for XXXor also for Spring Boot,在这里插入图片描述,第3张

三、原因分析

每次启动时,控制台第一行输出的“日志”称作为:控制台首行路径。

Error running ‘XXX‘: Command line is too long. Shorten command line for XXXor also for Spring Boot,在这里插入图片描述,第4张

关键就在于-classpath参数,它可以非常长,你依赖的jar包越多此路径就越长;你的base基路径越长它就越长;如果还要做复杂的Junit单元测试,那加入的jar包就更多长度可能就越长。

四、总结

总的来说:此part是很有可能超长从而导致Command line is too long现象的。