java:idea跑单测报错提示Command line is too long
1 背景
新拉下的项目代码,在idea中运行单测时抛错提示:Command line is too long。
2 解决方式
修改项目下,.idea/workspace.xml:

搜索标签:
<component name="PropertiesComponent">
修改如下(在标签内最后一行添加上< property name=“dynamic.classpath” value=“true” />):
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="dynamic.classpath" value="true" />
</component>

当使用IntelliJ IDEA运行单测时遇到'Command line is too long'的问题,可以通过修改工作区配置解决。具体操作是在.project/.idea/workspace.xml文件中找到<component name=PropertiesComponent>标签,然后在内部添加<property name=dynamic.classpath value=true/>。这样可以避免因类路径过长导致的命令行错误。
2753

被折叠的 条评论
为什么被折叠?



