



So you will have User-local default: none – if nothing was specified for the classpath shortener before, User-local default: JAR Manifest – if your settings specified the shortener via classpath, and User-local default: classpath file: – if your settings specified the shortener through the text file. The IDE will configure this setting, depending on the value of the properties set in: idea/workspace.xml file, property: “dynamic.classpath” and /options/options.xml file, property: “”. This option is set automatically for projects created before this EAP. The Original classpath is defined inside MANIFEST.MF as a Class-Path attribute in classpath.jar.Ĭlasspath file: The IDE will write a long classpath into a text file. JAR Manifest: The IDE passes the long classpath via a temporary classpath.jar. If the command line exceeds the OS limitation, the IDEA will not be able to run your application, but the tooltip will suggest configuring the shortener. The IDE doesn’t shorten the long classpath. The new field allows you to choose the way the IDE will shorten the command line from a drop-down list: In the Run/Debug Configuration dialog, a new field appeared: Shorten command line. IntelliJ IDEA 2017.3 provides a convenient way to specify the method to shorten command line, for each configuration. Starting with v2017.3, there is no more need to edit the settings of your IDE through the XML files.

For Application, JUnit and TestNG configurations, v2017.3 provides a way to configure the shortener. So the user is left having to make this decision. Unfortunately, that didn’t work either, for some other frameworks.Īnd, sadly, there is no way to predict which kind of shortening would work for the user application. Then, IntelliJ IDEA tried to use a more or less standard way, which was to pack the long classpath into the classpath.jar. But unfortunately, this didn’t work for some frameworks, e.g. Initially, IntelliJ IDEA tried to write the long classpath into the text file (which means an intermediate classloader to the application). There are several approaches to shorten the classpath. In such cases IntelliJ IDEA will try to shorten the classpath. The reason is that most operating systems have a command line length limitation. When the classpath gets too long, or you have many VM arguments, the program cannot be launched. Let’s take a closer look at when and how to use this feature. In IntelliJ IDEA, it’s possible to configure a command-line shortener.
