IDEA prompts CreateProcess error=206, the file name or extension is too long.

When using IDEA to run a test class, it prompts an error

CreateProcess error=206, The file name or extension is too long.

IDEA version: 2021.2.3
insert image description here

The main reason for this error is that the startup parameters brought by java startup exceed the maximum length limit of the window.

This error may be related to the version, and the solution is different;

The solution is as follows:

1. Open edit configurations and find short command line

insert image description here

insert image description here
If you can’t find this option, click the modify options option and check the menu; there
insert image description here
are three options in total, and the default option is none;
insert image description here

none: This is the default option, idea will not shorten the command line. If the command line exceeds the O

Guess you like

Origin blog.csdn.net/weixin_42551921/article/details/127260140