IDEA运行Java代码报错Command line is too long

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

解决方案一

在项目下的.idea/workspace.xml 中 <component name=“PropertiesComponent”> 标签下加入 <property name=“dynamic.classpath” value=“true” />
如下:
在这里插入图片描述

解决方案二

打开程序的运行配置,把Shorten command line改为JAR manifest或classpath file,如图所示:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_56058578/article/details/132729720