老版本解决方法:
在项目文件夹.idea/workspace.xml
中找到<component name="PropertiesComponent">
添加如下:
<property name="dynamic.classpath" value="true" />
然后重启软件即可
新版本解决方法:
IDEA提供了三种命令行缩短器选择:
-
none
:这是默认选项,IDEA不会缩短长类路径。如果命令行超出操作系统限制,则IDEA将无法运行您的应用程序
-
jar manifest
:IDEA通过临时classpath.jar传递长类路径,原始类路径在MANIFEST.MF中定义为classpath.jar中的类路径属性
-
classpath file
:IDEA将把长类路径写入文本文件