Problem with IDEA: Error running, Command line is too long. Shorten command line solution

Intellij IDEA use tutorial related series catalog

Run test error

Error running'MallTest.testRun': Command line is too long. Shorten command line for MallTest.testRun.
Test run by error. The command line is too long. Shorten the command line.
Insert picture description here

Reasons for the error The reason
for this is generally because the environment variables that the project needs to print are too long, exceeding the limit, and you need to shorten the command line to solve the problem.

Solution

  1. Modify the running configuration Configurations, change the default Shorten command line value user-local default to JAR mainifest or classpath file.
    This method needs to be set separately for each class each time.
    Insert picture description here
  2. In the .idea/workspace.xml file of the project, find it
    <component name="PropertiesComponent">, and add a line later. <property name="dynamic.classpath" value="true" />
    This way can be set once.

Guess you like

Origin blog.csdn.net/shi_hong_fei_hei/article/details/112634586