• 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官网关于参数的说明

  • 相关阅读:
    Python之pytest 基础
    unittest和pytest的区别
    Selenium 常用定位对象元素的方法
    ORCAl存储过程
    Mysql的存储过程
    TestNG 搭建测试框架 自动化测试
    通过junit/TestNG+java 实现自动化测试
    查看APP用到的图片方法
    码农干私活的建议(转)
    Android的onCreateOptionsMenu()创建菜单Menu详解(转)
  • 原文地址:https://www.cnblogs.com/tiancai/p/14550859.html
Copyright © 2020-2023  润新知