问题:启动项目报错:Error running 'WebappApplication': Command line is too long. Shorten command line for WebappAppl

 

解决方法:启动参数修改:edit configuration-springboot-webapplication-shorten command line

改成class file或者jar mainfest即可

这里改成class file

  

shorten command line知识点

如果类路径太长,或者有许多VM参数,程序就无法启动。原因是大多数操作系统都有命令行长度限制。在这种情况下,IntelliJIDEA将试图缩短类路径。

  shorten command line 选项提供三种选项缩短类路径。

  none:这是默认选项,idea不会缩短命令行。如果命令行超出了OS限制,这个想法将无法运行您的应用程序,但是工具提示将建议配置缩短器。

  JAR manifest:idea 通过临时的classpath.jar传递长的类路径。原始类路径在MANIFEST.MF中定义为classpath.jar中的类路径属性。

  classpath file:idea 将一个长类路径写入文本文件中。

建议使用第三种方式

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐