zoukankan      html  css  js  c++  java
  • JVM配置参数之(-D、-X、-XX的区别)

    JVM配置参数之(-D、-X、-XX的区别)

    最近在学习jvm调优相关的内容, 一直有一个疑问,为什么有些参数是以-X开头的,有些是以-XX开头的,还有-D开头的?


    通过查询资料、总结如下

    -XX

    说明:

    标准选择(Standard Options)
    这些是 JVM 的所有实现都支持的最常用的选项。

    These are the most commonly used options that are supported by all implementations of the JVM.

    示例:

    例如以-XX开头的配置参数
    -XX:+UseConcMarkSweepGC
    -XX:+CMSParallelRemarkEnable
    -XX:+UseFastAccessorMethods


    -X

    说明:

    非标准选择(Non-Standard Options)
    这些选项是特定于 Java HotSpot 虚拟机的通用选项。

    These options are general purpose options that are specific to the Java HotSpot Virtual Machine.

    示例:

    例如以-X开头的配置参数
    -Xmx256m
    -Xms256m
    -Xmn768m
    -Xss256k


    -D

    说明:

    设置系统属性值;
    -D属性名称=属性值

    Sets a system property value. The property variable is a string with no spaces that represents the name of the property. The value variable is a string that represents the value of the property. If value is a string with spaces, then enclose it in quotation marks (for example -Dfoo="foo bar").

    示例:

    例如以-D开头的配置参数
    -Dspring.profiles.active=release
    -Dspring.config.location=/opt/app/conf/

    如果 属性值 是一个带有空格的字符串,那么用引号将其括起来
    例如 -Dfoo = “ foo bar”


    如果想进一步了解参数的详细信息,可以查阅Oracle官网
    Oracle官网关于参数的说明

  • 相关阅读:
    Json对象和字符串互转
    JSNOP调用。。。
    org.hibernate.LazyInitializationException: could not initialize proxy no Session
    myeclipse生成注解实体
    jquery判断浏览器和版本
    JSTL XML标签库
    ORACLE 月份不全,补全月份的sql
    js 上下左右键控制焦点
    google gson使用
    js判断undefined类型
  • 原文地址:https://www.cnblogs.com/tiancai/p/14550859.html
Copyright © 2011-2022 走看看