dynamic.classpath标志有什么作用? (IntelliJ项目设置) [英] What does the dynamic.classpath flag do? (IntelliJ project settings)

查看:3673
本文介绍了dynamic.classpath标志有什么作用? (IntelliJ项目设置)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.idea / workspace.xml 文件中,可以找到以下内容:

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

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

dynamic.classpath标志的用途是什么?

What is the purpose of the dynamic.classpath flag?

将其设置为true恰好是解决方法对于IntelliJ错误。但我也很好奇它是否有任何副作用。

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

推荐答案

此选项控制如何将类路径传递给JVM:via命令行,或通过文件。大多数操作系统都有最大命令行限制,当超出时,IDEA将无法运行您的应用程序。

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.

当命令行超过32768个字符时,IDEA建议您切换到动态类路径。将长类路径写入文件,然后由应用程序启动程序读取并通过系统类加载器加载。

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.

如果您对实施细节感兴趣,可以查看IDEA社区版源代码, JdkUtil.java 文件, setupJVMCommandLine 方法。

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

这篇关于dynamic.classpath标志有什么作用? (IntelliJ项目设置)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆