IDEA中shorten command line的配置/报错:Command line is too long

报错:

Error running ‘xxx’:
Command line is too long. Shorten command line for xxx or also for Application default configuration.

解决
建议把shorten command line改为 classpath file

具体可参考【官方文档】:https://blog.jetbrains.com/idea/2017/10/intellij-idea-2017-3-eap-configurable-command-line-shortener-and-more/

如果类路径太长,或者您有许多VM参数,则无法启动该程序。原因是大多数操作系统都有命令行长度限制。在这种情况下,IntelliJ IDEA将尝试缩短类路径。
在这里插入图片描述
shorten command line下有:

User-local default: 旧版属性。对于在此EAP之前创建的项目,将自动设置此选项。
None:
这是默认选项。IDE不会缩短长类路径。如果命令行超出了操作系统限制,则IDEA将无法运行您的应用程序,但是工具提示将建议配置缩短器

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

classpath file:
IDE将把长类路径写入文本文件


版权声明:本文为ABCAA1024原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。