Why does Java , running in -server mode, say that the version is quot;mixed-modequot;?(为什么在 -server 模式下运行的 Java 说版本是“混合模式?)
问题描述
为什么在 -server 模式下运行的 Java 说版本是混合模式"?当我看到时,这是否意味着 JVM 并没有真正以纯服务器模式加载?
Why does Java , running in -server mode, say that the version is "mixed-mode" ? When I see that, does it mean that the JVM didn't truly load in pure server mode?
推荐答案
服务器模式并不意味着不混合".这些是不同的设置.
server mode does not mean "not mixed". Those are different settings.
混合确实意味着 JVM 将混合编译和解释代码.您可以选择使用开关 -Xint 切换到完全解释模式(通常您不想这样做).
Mixed does mean that the JVM will mix compiled and interpreted code. You could optionally switch to fully interpreted mode with the switch -Xint (usually you don't want to do this).
服务器模式意味着热点编译器将使用服务器设置运行.一般的假设是服务器模式下的虚拟机是长时间运行的,因此在进行优化时会考虑到这一点.
Server mode means that the hot-spot-compiler will run with server-settings. The general assumption is that VMs in server-mode are long-running, so optimizations will be done with this in mind.
因此,如果您看到混合模式,这并不表明您的 VM 未在服务器模式下运行.
So if you see mixed mode, that is no sign that your VM is not running in server-mode.
如果您想检查真正运行的内容,请尝试
If you want to check what is really running, try the output of
System.out.println(System.getProperty("java.vm.name"));
System.out.println(System.getProperty("java.vm.info"));
至少对于 Sun VM 或 OpenJDK,这会给您一个提示.您可能会注意到,如果您在 64 位系统上,您将始终运行服务器 VM.
At least for the Sun VM or OpenJDK this will give you a hint. You might notice that you'll always run the Server VM if you are on a 64 bit system.
这篇关于为什么在 -server 模式下运行的 Java 说版本是“混合模式"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么在 -server 模式下运行的 Java 说版本是“混合模式"?


- 如何使用WebFilter实现授权头检查 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01