zoukankan      html  css  js  c++  java
  • jvm运行时环境属性一览

    前言:

    在web编程技术内幕中看到一个用apache组件进行文件下载的例子,对于DiskFileUpload类的setRepositoryPath方法,设置临时文件的存放路径,里面指出如果不调用该方法指定绝对路径。那么会使用"java.io.tempdir"这个环境属性的值。想到前面没有遇到过这个环境属性,这里列举出所有环境属性。代码如下:

    1         Properties properties = System.getProperties();
    2         Enumeration names = properties.propertyNames();
    3         String propertyName;
    4         while (names.hasMoreElements()) {
    5             propertyName = (String) names.nextElement();
    6             System.out.print(propertyName + ":");
    7             System.out.println(properties.getProperty(propertyName));
    8         }
    getSysProps

    运行结果如下:

     1 java.runtime.name:Java(TM) SE Runtime Environment
     2 sun.boot.library.path:E:MyEclipseJDK1.8jrein
     3 java.vm.version:25.101-b13
     4 java.vm.vendor:Oracle Corporation
     5 java.vendor.url:http://java.oracle.com/
     6 path.separator:;
     7 java.vm.name:Java HotSpot(TM) 64-Bit Server VM
     8 file.encoding.pkg:sun.io
     9 idea.launcher.port:7535
    10 user.script:
    11 user.country:CN
    12 sun.java.launcher:SUN_STANDARD
    13 sun.os.patch.level:Service Pack 1
    14 java.vm.specification.name:Java Virtual Machine Specification
    15 user.dir:E:MyEclipseworkspaceScriptEngine
    16 java.runtime.version:1.8.0_101-b13
    17 java.awt.graphicsenv:sun.awt.Win32GraphicsEnvironment
    18 java.endorsed.dirs:E:MyEclipseJDK1.8jrelibendorsed
    19 os.arch:amd64
    20 java.io.tmpdir:C:UsersADMINI~1AppDataLocalTemp
    21 line.separator:
    22 
    23 java.vm.specification.vendor:Oracle Corporation
    24 user.variant:
    25 os.name:Windows 7
    26 sun.jnu.encoding:GBK
    27 java.library.path:E:MyEclipseJDK1.8in;C:WindowsSunJavain;C:Windowssystem32;C:Windows;E:Toolsjruby-9.1.2.0in;E:MyEclipseJDK1.8in;C:ProgramDataOracleJavajavapath;E:Toolsjruby-9.1.2.0in;E:ToolsPython3.6Scripts;E:ToolsPython3.6;.
    28 java.specification.name:Java Platform API Specification
    29 java.class.version:52.0
    30 sun.management.compiler:HotSpot 64-Bit Tiered Compilers
    31 os.version:6.1
    32 user.home:C:UsersAdministrator
    33 user.timezone:
    34 java.awt.printerjob:sun.awt.windows.WPrinterJob
    35 java.specification.version:1.8
    36 file.encoding:UTF-8
    37 idea.launcher.bin.path:E:IntelliJ IDEA 2016.2.2in
    38 user.name:Administrator
    39 java.class.path:E:MyEclipseworkspaceScriptEnginein;E:Toolsjpythonjython.jar;E:MyEclipseJDK1.8jrelibcharsets.jar;E:MyEclipseJDK1.8jrelibdeploy.jar;E:MyEclipseJDK1.8jrelibextaccess-bridge-64.jar;E:MyEclipseJDK1.8jrelibextcldrdata.jar;E:MyEclipseJDK1.8jrelibextdnsns.jar;E:MyEclipseJDK1.8jrelibextjaccess.jar;E:MyEclipseJDK1.8jrelibextjfxrt.jar;E:MyEclipseJDK1.8jrelibextlocaledata.jar;E:MyEclipseJDK1.8jrelibext
    ashorn.jar;E:MyEclipseJDK1.8jrelibextsunec.jar;E:MyEclipseJDK1.8jrelibextsunjce_provider.jar;E:MyEclipseJDK1.8jrelibextsunmscapi.jar;E:MyEclipseJDK1.8jrelibextsunpkcs11.jar;E:MyEclipseJDK1.8jrelibextzipfs.jar;E:MyEclipseJDK1.8jrelibjavaws.jar;E:MyEclipseJDK1.8jrelibjce.jar;E:MyEclipseJDK1.8jrelibjfr.jar;E:MyEclipseJDK1.8jrelibjfxswt.jar;E:MyEclipseJDK1.8jrelibjsse.jar;E:MyEclipseJDK1.8jrelibmanagement-agent.jar;E:MyEclipseJDK1.8jrelibplugin.jar;E:MyEclipseJDK1.8jrelib
    esources.jar;E:MyEclipseJDK1.8jrelib
    t.jar;E:Toolsjruby-9.1.2.0libjruby.jar;E:IntelliJ IDEA 2016.2.2libidea_rt.jar
    40 java.vm.specification.version:1.8
    41 sun.arch.data.model:64
    42 java.home:E:MyEclipseJDK1.8jre
    43 sun.java.command:com.intellij.rt.execution.application.AppMain TestRuby
    44 java.specification.vendor:Oracle Corporation
    45 user.language:zh
    46 awt.toolkit:sun.awt.windows.WToolkit
    47 java.vm.info:mixed mode
    48 java.version:1.8.0_101
    49 java.ext.dirs:E:MyEclipseJDK1.8jrelibext;C:WindowsSunJavalibext
    50 sun.boot.class.path:E:MyEclipseJDK1.8jrelib
    esources.jar;E:MyEclipseJDK1.8jrelib
    t.jar;E:MyEclipseJDK1.8jrelibsunrsasign.jar;E:MyEclipseJDK1.8jrelibjsse.jar;E:MyEclipseJDK1.8jrelibjce.jar;E:MyEclipseJDK1.8jrelibcharsets.jar;E:MyEclipseJDK1.8jrelibjfr.jar;E:MyEclipseJDK1.8jreclasses
    51 java.vendor:Oracle Corporation
    52 file.separator:
    53 java.vendor.url.bug:http://bugreport.sun.com/bugreport/
    54 sun.cpu.endian:little
    55 sun.io.unicode.encoding:UnicodeLittle
    56 sun.desktop:windows
    57 sun.cpu.isalist:amd64
    Result
  • 相关阅读:
    聊聊豆瓣阅读kindle版..顺便悼念一下library.nu…
    PhoneGap+jQm webapp本地化(1)环境搭建以及资源介绍
    尝试分析Q群作为技术群是个不恰当的选择!
    某android平板项目开发笔记计划任务备份
    android 自动化测试的傻瓜实践之旅(UI篇) 小试身手
    latex/Xelatex书籍排版总结顺便附上一本排好的6寸android书…
    某android平板项目开发笔记自定义sharepreference UI
    android ORM框架的性能简单测试(androrm vs ormlite)
    网络管理员必学手册
    PPT插入FLV视频文件的简单方法
  • 原文地址:https://www.cnblogs.com/Kidezyq/p/5816744.html
Copyright © 2011-2022 走看看