Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the dynamic.classpath flag do? (IntelliJ project settings)

Within the file .idea/workspace.xml the following can be found:

<component name="PropertiesComponent">   ...   <property name="dynamic.classpath" value="false" /> </component> 

What is the purpose of the dynamic.classpath flag?

Setting it to true happens to be a workaround for an IntelliJ bug. But I'm also curious if it has any side effects.

like image 928
Arne Evertsson Avatar asked Jan 31 '11 16:01

Arne Evertsson


1 Answers

This option controls how classpath is passed to the JVM: via the command line, or via a file. Most operating systems have maximum command line limit, when it's exceeded, IDEA will not be able to run your application.

When command line is longer than 32768 chars, IDEA suggests you switching to the dynamic classpath. Long classpath is written to a file, then read by the application launcher and loaded via system classloader.

If you are interested in the implementation details, you can check IDEA Community edition source code, JdkUtil.java file, setupJVMCommandLine method.

like image 97
CrazyCoder Avatar answered Sep 20 '22 07:09

CrazyCoder