简介
本文介绍如何解决IDEA启动项目时的报错:Command line is too long
错误日志
Error running 'ServiceStarter': Command line is too long. Shorten command line for ServiceStarter or also for Application default configuration.
解决方法1
Run=> Edit Configuration=> SpringBoot=> Configuration=> Environment=> Shorten command line=>
将none项改为"Jar manifest"
解决方法2
修改项目下 .idea\workspace.xml,找到标签 , 在标签里加一行
<property name="dynamic.classpath" value="true" />
解释
该选项控制如何将classpath传递给JVM:通过命令行或通过文件。大多数操作系统都有最大的命令行限制,当它超过时,IDEA将无法运行您的应用程序。 当命令行长于32768个字符时,IDEA建议您切换到动态类路径,长类路径被写入文件,然后由应用程序启动器读取并通过系统类加载器加载。