I have tried these solutions but none of them fix my problem. To solve the issue I change the following configuration: Run > Edit Configurations > select JUnit Confifurations that you use > Shorten command line > select JAR manifest (this was selected as @argfile (Java 9+))