sysprop

sysprop在线教程

查看当前JVM的系统属性(System Property)

使用参考

  1. USAGE:
  2. sysprop [-h] [property-name] [property-value]
  3. SUMMARY:
  4. Display, and change all the system properties.
  5. EXAMPLES:
  6. sysprop
  7. sysprop file.encoding
  8. sysprop production.mode true
  9. WIKI:
  10. https://arthas.aliyun.com/doc/sysprop
  11. OPTIONS:
  12. -h, --help this help
  13. <property-name> property name
  14. <property-value> property value

查看所有属性

  1. $ sysprop
  2. KEY VALUE
  3. -------------------------------------------------------------------------------------------------------------------------------------
  4. java.runtime.name Java(TM) SE Runtime Environment
  5. sun.boot.library.path /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
  6. java.vm.version 25.51-b03
  7. user.country.format CN
  8. gopherProxySet false
  9. java.vm.vendor Oracle Corporation
  10. java.vendor.url http://java.oracle.com/
  11. path.separator :
  12. java.vm.name Java HotSpot(TM) 64-Bit Server VM
  13. file.encoding.pkg sun.io
  14. user.country US
  15. sun.java.launcher SUN_STANDARD
  16. sun.os.patch.level unknown
  17. java.vm.specification.name Java Virtual Machine Specification
  18. user.dir /private/var/tmp
  19. java.runtime.version 1.8.0_51-b16
  20. java.awt.graphicsenv sun.awt.CGraphicsEnvironment
  21. java.endorsed.dirs /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/endors
  22. ed
  23. os.arch x86_64
  24. java.io.tmpdir /var/folders/2c/tbxwzs4s4sbcvh7frbcc7n000000gn/T/
  25. line.separator
  26. java.vm.specification.vendor Oracle Corporation
  27. os.name Mac OS X
  28. sun.jnu.encoding UTF-8
  29. java.library.path /Users/wangtao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Libra
  30. ry/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
  31. sun.nio.ch.bugLevel
  32. java.specification.name Java Platform API Specification
  33. java.class.version 52.0
  34. sun.management.compiler HotSpot 64-Bit Tiered Compilers
  35. os.version 10.12.6
  36. user.home /Users/wangtao
  37. user.timezone Asia/Shanghai
  38. java.awt.printerjob sun.lwawt.macosx.CPrinterJob
  39. file.encoding UTF-8
  40. java.specification.version 1.8
  41. user.name wangtao
  42. java.class.path .
  43. java.vm.specification.version 1.8
  44. sun.arch.data.model 64
  45. java.home /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
  46. sun.java.command Test
  47. java.specification.vendor Oracle Corporation
  48. user.language en
  49. awt.toolkit sun.lwawt.macosx.LWCToolkit
  50. java.vm.info mixed mode
  51. java.version 1.8.0_51
  52. java.ext.dirs /Users/wangtao/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.
  53. 8.0_51.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library
  54. /Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
  55. sun.boot.class.path /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resour
  56. ces.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/li
  57. b/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/l
  58. ib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/H
  59. ome/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Content
  60. s/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Conte
  61. nts/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jd
  62. k/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.
  63. jdk/Contents/Home/jre/classes
  64. java.vendor Oracle Corporation
  65. file.separator /
  66. java.vendor.url.bug http://bugreport.sun.com/bugreport/
  67. sun.cpu.endian little
  68. sun.io.unicode.encoding UnicodeBig
  69. sun.cpu.isalist

查看单个属性

支持通过TAB键自动补全

  1. $ sysprop java.version
  2. java.version=1.8.0_51

修改单个属性

  1. $ sysprop user.country
  2. user.country=US
  3. $ sysprop user.country CN
  4. Successfully changed the system property.
  5. user.country=CN