idea报错:Error running $classname: Command line is too long. Shorten command line for $classname. 解决

 Command line is too long

打印的变量太长了,超过了限制,这都会报错...我只想知道idea基于什么原理会报这个错...

1.按照提示修改该类的配置,选择jar manifest

idea报错:Error running $classname: Command line is too long. Shorten command line for $classname.
解决

2.在项目的.idea/workspace.xml文件中,找到 <component name="PropertiesComponent">,添加一行<property name="dynamic.classpath" value="true" />

idea报错:Error running $classname: Command line is too long. Shorten command line for $classname.
解决