Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command line is too long. Shorten command line for Test or also for JUnit default configuration?

im trying to run my junits, but intellij give me a error:

I have seen the error on many sites, but the configuration page is different than the current one from intellij.

Now, intellij-idea have this configuration page:

What would I have to modify to be able to fix it?

Here is my intellij info:

IntelliJ IDEA 2020.3.2 (Ultimate Edition) Build #IU-203.7148.57, built on January 26, 2021 Runtime version: 11.0.9.1+11-b1145.77 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 1955M Cores: 8 Non-Bundled Plugins: com.dubreuia, org.sonarlint.idea, org.jetbrains.kotlin

Greetings and thank you very much: D

like image 608
Katakurinna Avatar asked Feb 24 '21 12:02

Katakurinna


Video Answer


2 Answers

You can shorten the command line, by checking "Shorten Command Line" in the "Add Run Options" menu that is found under "Modify Options" in the "Build and Run" tab for the test configure - as shown below.

enter image description here

like image 57
747lo Avatar answered Oct 09 '22 10:10

747lo


From this link: https://devis.cool/quick-fix/quickfix-intellij-idea-command-line-is-too-long-shorten-command-line-for/

Open file from project root folder .idea/workspace.xml, go to section and add the following:

<property name="dynamic.classpath" value="true" />

It should look something like this:

<component name="PropertiesComponent">
    <property name="dynamic.classpath" value="true" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="aspect.path.notification.shown" value="true" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component>

It worked for me.

like image 35
Mayank Raghav Avatar answered Oct 09 '22 10:10

Mayank Raghav