In the Run/Debug Configuration dialog, a new field appeared: Shorten command line. The new field allows you to choose the way the IDE will shorten the command line from a drop-down list: None: This is the default option. The IDE doesn't shorten the long classpath.
Run > Edit Configurations... Select a test (better to select a parent test class) and set a Shorten command line: option to classpath file . Then OK (or Apply, OK).
From the main menu, select Run | Edit Configurations. Alternatively, press Alt+Shift+F10 , then 0 . on the toolbar or press Alt+Insert . The list shows the run/debug configuration templates.
Inside your .idea folder, change workspace.xml file
Add
<property name="dynamic.classpath" value="true" />
to
<component name="PropertiesComponent">
.
.
.
</component>
Example
<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>
If you don't see one, feel free to add it yourself
<component name="PropertiesComponent">
<property name="dynamic.classpath" value="true" />
</component>
Intellij 2018.2.5
Run => Edit Configurations => Choose Node on the left hand side => expand Environment => Shorten Command line options => choose Classpath file or JAR manifest
You can set up a default way to shorten the command line and use it as a template for further configurations by changing the default JUnit Run/Debug Configuration template. Then all new Run/Debug configuration you create in project will use the same option.
Here is the related blog post about configurable command line shortener option.
Thanks to Rajesh Goel in Android Studio
:
Run > Edit Configurations...
Select a test (better to select a parent test class) and set a Shorten command line:
option to classpath file
. Then OK (or Apply, OK).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With