获取系统个参数值,list全部,看哪个能用

java 专栏收录该内容
12 篇文章 0 订阅

列出全部位置:
System.getProperties().list(System.out);
获取其中一个的值:
System.getProperty(“user.dir”)

-- listing properties --
java.vendor=Oracle Corporation
sun.java.launcher=SUN_STANDARD
catalina.base=/home/corpwx/tomcat-8.5.64
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
sun.nio.ch.bugLevel=
catalina.useNaming=true
os.name=Linux
sun.boot.class.path=/usr/local/java/jdk1.8.0_271/jre/lib/...
java.util.logging.config.file=/home/corpwx/tomcat-8.5.64/conf/loggi...
java.vm.specification.vendor=Oracle Corporation
java.runtime.version=1.8.0_271-b09
user.name=corpwx
tomcat.util.scan.StandardJarScanFilter.jarsToScan=log4j-taglib*.jar,log4j-web*.jar,log4...
shared.loader=
tomcat.util.buf.StringCache.byte.enabled=true
user.language=en
java.naming.factory.initial=org.apache.naming.java.javaURLContext...
sun.boot.library.path=/usr/local/java/jdk1.8.0_271/jre/lib/...
com.zaxxer.hikari.pool_number=1
PID=2098
jdk.tls.ephemeralDHKeySize=2048
java.version=1.8.0_271
java.util.logging.manager=org.apache.juli.ClassLoaderLogManager
user.timezone=Asia/Shanghai
sun.arch.data.model=64
java.util.concurrent.ForkJoinPool.common.threadFactory=org.apache.catalina.startup.SafeForkJ...
java.endorsed.dirs=/usr/local/java/jdk1.8.0_271/jre/lib/...
sun.cpu.isalist=
sun.jnu.encoding=UTF-8
file.encoding.pkg=sun.io
package.access=sun.,org.apache.catalina.,org.apache....
file.separator=/
java.specification.name=Java Platform API Specification
java.class.version=52.0
user.country=US
LOG_FILE=./log/trtcapi.log
java.home=/usr/local/java/jdk1.8.0_271/jre
java.vm.info=mixed mode
os.version=3.10.0-957.21.3.el7.x86_64
sun.font.fontmanager=sun.awt.X11FontManager
path.separator=:
java.vm.version=25.271-b09
java.protocol.handler.pkgs=org.apache.catalina.webresources
java.awt.printerjob=sun.print.PSPrinterJob
sun.io.unicode.encoding=UnicodeLittle
awt.toolkit=sun.awt.X11.XToolkit
package.definition=sun.,java.,org.apache.catalina.,org.a...
java.naming.factory.url.pkgs=org.apache.naming
user.home=/home/corpwx
org.apache.catalina.security.SecurityListener.UMASK=0027
java.specification.vendor=Oracle Corporation
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=annotations-api.jar,ant-junit*.jar,an...
java.library.path=/usr/java/packages/lib/amd64:/usr/lib...
java.vendor.url=http://java.oracle.com/
spring.beaninfo.ignore=true
java.vm.vendor=Oracle Corporation
common.loader="${catalina.base}/lib","${catalina.ba...
java.runtime.name=Java(TM) SE Runtime Environment
sun.java.command=org.apache.catalina.startup.Bootstrap...
java.class.path=/home/corpwx/tomcat-8.5.64/bin/bootst...
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.version=1.8
catalina.home=/home/corpwx/tomcat-8.5.64
sun.cpu.endian=little
sun.os.patch.level=unknown
java.awt.headless=true
java.io.tmpdir=/home/corpwx/tomcat-8.5.64/temp
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
server.loader=
os.arch=amd64
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.ext.dirs=/usr/local/java/jdk1.8.0_271/jre/lib/...
user.dir=/home/corpwx/tomcat-8.5.64/logs
line.separator=

java.vm.name=Java HotSpot(TM) 64-Bit Server VM
ignore.endorsed.dirs=
file.encoding=UTF-8
java.specification.version=1.8
  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

参与评论 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

Storm Mun

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值