当我运行测试时,我得到错误“命令行太长”。如果我将Run/Debug配置中的"Shorten command line“方法设置为特定方法或类的"JAR manifest”,那么它是有效的,但是我如何为整个项目设置它,或者它是否有IDE全局设置?
发布于 2017-12-21 22:56:50
您可以设置一种默认方式来缩短命令行,并将其用作通过changing the default JUnit运行/调试配置模板进行进一步配置的模板。然后,您在项目中创建的所有新的运行/调试配置都将使用相同的选项。
这是关于可配置命令行缩短器选项的related blog post。
发布于 2018-06-05 03:24:30
在您的.idea文件夹中,更改workspace.xml文件
添加
<property name="dynamic.classpath" value="true" />
至
<component name="PropertiesComponent">
.
.
.
</component>
示例
<component name="PropertiesComponent">
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="dynamic.classpath" value="true" />
</component>
如果您没有看到,请自行添加
<component name="PropertiesComponent">
<property name="dynamic.classpath" value="true" />
</component>
发布于 2018-11-01 05:08:23
Intellij 2018.2.5
运行=>编辑配置=>选择左侧的节点=>展开环境=>缩短命令行选项=>选择类路径文件或JAR清单
https://stackoverflow.com/questions/47926382
复制相似问题