`

System.getProperties();各操作系统取值

阅读更多
我试验的数据:
JB8 + XP2003 server = Windows XP
JB8 + XP = Windows XP

网上找的:
Windows VMs



------------------------------------------------------
OS: Windows95
Processor: Pentium
VM: SunJDK1.0.2
Notes:
Contributor: CK

os.name=            "Windows 95"                   "windows 95"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.0.2"                        "1.0.2"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS: Windows95
Processor: Pentium
VM: SunJDK1.1.4
Notes:
Contributor: CK

os.name=            "Windows 95"                   "windows 95"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.4"                        "1.1.4"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS:          Windows NT       
Processor:   x86
VM:          Microsoft1.1       
Notes:
Contributor: AB

os.name=            "Windows NT"                   "windows nt"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Microsoft Corp."              "microsoft corp."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1"                          "1.1"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS:          Windows NT 4.0
Processor:   Pentium II
VM:          JDK 1.1.6
Notes:
Contributor: NB

os.name=            "Windows NT"                   "windows nt"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
My Windows NT 4.0 box with Java 1.1.6 reports:
Contributor: RG

osName                  = WindowsNT
osArch                  = x86
osVersion               = 4.0
vendor                  = Sun Microsystems Inc.
APIVersion              = 45.3
interpeterVersion       = 1.1.6


------------------------------------------------------
OS:          Windows CE 2.0         
Processor:   SH3                    
VM:     Microsoft CE JDK Version 1.0
Notes: This was the February release - The line separator is interesting for
a windows machine...
Contributor: AW

os.name=            "Windows CE"                   "windows ce"
os.arch=            "Unknown"                      "unknown"
os.version=         "2.0 Beta"                     "2.0 beta"
java.vendor=        "Microsoft"                    "microsoft"
java.class.version= "JDK1.1"                       "jdk1.1"
java.version=       "JDK1.1"                       "jdk1.1"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          NT Workstation 4.0
Processor:   Pentium MMX 200Mhz
VM:          SuperCede 2.03
Notes:
Contributor: AL

os.name=            "Windows NT"                   "windows nt"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "SuperCede Inc."               "supercede inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.4"                        "1.1.4"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS:          Windows 95
Processor:   Pentium 166
VM:          Netscape Communications Corporation -- Java 1.1.2
Notes:       Obtained in Netscape Navigator 4.03.
Contributor: DG

os.name=            "Windows 95"                   "windows 95"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Netscape Communications Corporation""netscape
communications corporation"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.2"                        "1.1.2"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          Windows 95
Processor:   Pentium 166
VM:          Microsoft SDK for Java 2.01
Notes:       Obtained in Internet Explorer 4 (version 4.71.1712.6).
Contributor: DG

os.name=            "Windows 95"                   "windows 95"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Microsoft Corp."              "microsoft corp."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1"                          "1.1"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS:          Windows 95       
Processor:   Pentium
VM:          Netscape       
Notes:       Created in Netscape Navigator 3.01 for Win95.
Contributor: DG

os.name=            "Windows 95"                   "windows 95"
os.arch=            "Pentium"                      "pentium"
os.version=         "4.0"                          "4.0"
java.vendor=        "Netscape Communications Corporation""netscape communications corporation"
java.class.version= "45.3"                         "45.3"
java.version=       "1.02"                         "1.02"
file.separator=     "/"                            "/"
path.separator=     ";"                            ";"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS: Windows NT Workstation 4.0 Service Pack 3
Processor: Pentium II 266
VM: Sun JDK 1.2 beta 4
Notes:
Contributor: JH2

os.name=            "Windows NT"                   "windows nt"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.2beta4"                     "1.2beta4"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS: Windows NT Workstation 4.0 Service Pack 3
Processor: Pentium II 266
VM: Symantec Java! JustInTime Compiler Version 3.00.029(i) for JDK 1.1.x
Notes:
Contributor: JH2

os.name=            "Windows NT"                   "windows nt"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Symantec Corporation"         "symantec corporation"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.5"                        "1.1.5"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"


------------------------------------------------------
OS:          WinNT 4.00.1381        
Processor:   x86 Family 5 Model 6   
VM:          IE 3.02       
Notes:
Contributor: PB

os.name=            "Windows NT"                   "windows nt"
os.arch=            "x86"                          "x86"
os.version=         "4.0"                          "4.0"
java.vendor=        "Microsoft Corp."              "microsoft corp."
java.class.version= "45.3"                         "45.3"
java.version=       "1.0.2"                        "1.0.2"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"




--------------------------------------------------------------------------------


Mac VMs



------------------------------------------------------
OS: MacOS 7.5.1
Processor: PowerMac
VM: Metrowerks CodeWarrior Pro2, standard and JIT
Notes:
Contributor: CK

os.name=            "Mac OS"                       "mac os"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "7.5.1"                        "7.5.1"
java.vendor=        "Metrowerks Corp."             "metrowerks corp."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.3"                        "1.1.3"
file.separator=     "/"                            "/"
path.separator=     ";"                            ";"
line.separator=     "0xd"                          "0xd"


------------------------------------------------------
OS: MacOS 7.5.1
Processor: PowerMac
VM: MRJ 1.0.2, 1.5, 2.0d2 (values are the same for all three)
Notes:
Contributor: CK

os.name=            "Mac OS"                       "mac os"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "7.5.1"                        "7.5.1"
java.vendor=        "Apple Computer, Inc."         "apple computer, inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.0.2"                        "1.0.2"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xd"                          "0xd"


------------------------------------------------------
OS: MacOS 8.1
Processor: PowerPC 604e
VM: MRJ 2.0
Notes:
Contributor: BG

os.name=            "Mac OS"                       "mac os"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "8.1"                          "8.1"
java.vendor=        "Apple Computer, Inc."         "apple computer, inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.3"                        "1.1.3"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xd"                          "0xd"


------------------------------------------------------
OS:          MacOS 8.0       
Processor:   PowerPC 603e
VM:          MRJ 2.1 ea1       
Notes:
Contributor: MJ

os.name=            "Mac OS"                       "mac os"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "8"                            "8"
java.vendor=        "Apple Computer, Inc."         "apple computer, inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.5"                        "1.1.5"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xd"                          "0xd"


------------------------------------------------------
OS:          MacOS version 8.1       
Processor:   PowerPC 750 (?)
VM:          Netscape Navigator       
Notes:       Obtained in Netscape Navigator 4.05-98085.
Contributor: DG

os.name=            "Mac OS"                       "mac os"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "7.5"                          "7.5"
java.vendor=        "Netscape Communications Corporation""netscape communications corporation"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.2"                        "1.1.2"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          MacOS version 8.1
Processor:   PowerPC 750 (?)
VM:          Microsoft Virtual Machine
Notes:       Obtained in Internet Explorer 4.01 (PowerPC) with "Java virtual Machine"
             pop-up preference set to "Microsoft Virtual Machine".
Contributor: DG

os.name=            "MacOS"                        "macos"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "8.1.0"                        "8.1.0"
java.vendor=        "Microsoft Corp."              "microsoft corp."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.4"                        "1.1.4"
file.separator=     "/"                            "/"
path.separator=     ";"                            ";"
line.separator=     "0xd"                          "0xd"


------------------------------------------------------
OS:          MacOS version 8.1
Processor:   PowerPC 750 (?)
VM:          Apple MRJ
Notes:       Obtained in Internet Explorer 4.01 (PowerPC) with "Java virtual Machine"
             pop-up preference set to "Apple MRJ".
Contributor: DG

os.name=            "Mac OS"                       "mac os"
os.arch=            "PowerPC"                      "powerpc"
os.version=         "8.1"                          "8.1"
java.vendor=        "Apple Computer, Inc."         "apple computer, inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.3"                        "1.1.3"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xd"                          "0xd"




--------------------------------------------------------------------------------


Linux VMs



------------------------------------------------------
OS: Redhat Linux 5.0
Processor: Pentium
VM: blackdown.org JDK1.1.6 v2
Notes:
Contributor: CK

os.name=            "Linux"                        "linux"
os.arch=            "x86"                          "x86"
os.version=         "2.0.31"                       "2.0.31"
java.vendor=        "Sun Microsystems Inc., ported by Randy Chapman and Steve Byrne""sun microsystems inc., ported by randy chapman and steve byrne"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"










--------------------------------------------------------------------------------


Solaris



------------------------------------------------------
OS:          Solaris 2.5.1       
Processor:   Ultra1
VM:          Sun JDK 1.1.6       
Notes:
Contributor: MJ

os.name=            "Solaris"                      "solaris"
os.arch=            "sparc"                        "sparc"
os.version=         "2.x"                          "2.x"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          Solaris 2.5.1
Processor:   Sparc Ultra 1
VM:          Sun JDK 1.1.6
Notes:
Contributor: JH

os.name=            "Solaris"                      "solaris"
os.arch=            "sparc"                        "sparc"
os.version=         "2.x"                          "2.x"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          Solaris       
Processor:   sparc
VM:          jdk1.1.6       
Notes:
Contributor: AB

os.name=            "Solaris"                      "solaris"
os.arch=            "sparc"                        "sparc"
os.version=         "2.x"                          "2.x"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          SunOS 5.6 (Solaris 2.6)
Processor:   sparc
VM:          JDK 1.1.3
Notes:
Contributor: NB

os.name=            "Solaris"                      "solaris"
os.arch=            "sparc"                        "sparc"
os.version=         "2.x"                          "2.x"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.3"                        "1.1.3"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
On my Sun with JDK 1.1.6 I get -
Contributor: CA

osName=Solaris
osArch=sparc
osVersion=2.x
vendor=Sun Microsystems Inc.
APIVersion=45.3
interpreterVersion=1.1.6


------------------------------------------------------
OS:          Solaris 2.5.1
Processor:   UltraSparc
VM:          Javasoft JDK 1.0.2
Notes:
Contributor: CA

os.name=            "Solaris"                      "solaris"
os.arch=            "sparc"                        "sparc"
os.version=         "2.x"                          "2.x"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.0.2"                        "1.0.2"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"








--------------------------------------------------------------------------------


OS/2



------------------------------------------------------
OS: OS/2
Processor: Pentium
VM: OS/2 JDK 1.1.6
Notes: JDK 1.1.6 IBM build o116-19980728 (JIT: javax), OS/2 Warp 4, FP7
Contributor: SP

os.name=            "OS/2"                         "os/2"
os.arch=            "x86"                          "x86"
os.version=         "20.40"                        "20.40"
java.vendor=        "IBM Corporation"              "ibm corporation"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"












--------------------------------------------------------------------------------


Other Unix Systems



------------------------------------------------------
OS:          MPE/iX 5.5 (PowerPatch 3)
Processor:   HP 3000/968  (PA-RISC)
VM:          (unknown - HP provided - JDK 1.1.5)
Notes:
Contributor: SS

os.name=            "MPE/iX"                       "mpe/ix"
os.arch=            "PA-RISC"                      "pa-risc"
os.version=         "C.55.00"                      "c.55.00"
java.vendor=        "HP CSY (freeware)."           "hp csy (freeware)."
java.class.version= "45.3"                         "45.3"
java.version=       "JDK 1.1.5"                    "jdk 1.1.5"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
here are the results for the latest HP-UX JDK (HP-UX 10.20):
AS told me (CK) that for HP-UX java.version will always have the same general format;
the letter ( "C" in the sample ) might change, and there may or may
not be a date after the version number.
Contributor: AS

os.name=            "HP-UX"                        "hp-ux"
os.arch=            "PA-RISC"                      "pa-risc"
os.version=         "B.10.20"                      "b.10.20"
java.vendor=        "Hewlett Packard Co."          "hewlett packard co."
java.class.version= "45.3"                         "45.3"
java.version=       "HP-UX Java C.01.15.03 07/07/98""hp-ux java c.01.15.03 07/07/98"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          HP-UX
Processor:   PA-RISC
VM:          HP-UX Java C.01.15.01
Notes: (see the notes in the previous entry)
Contributor: NB

os.name=            "HP-UX"                        "hp-ux"
os.arch=            "PA-RISC"                      "pa-risc"
os.version=         "B.10.20"                      "b.10.20"
java.vendor=        "Hewlett Packard Co."          "hewlett packard co."
java.class.version= "45.3"                         "45.3"
java.version=       "HP-UX Java C.01.15.01"        "hp-ux java c.01.15.01"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          AIX 4.3
Processor:   Power
VM:          JDK 1.1.2
Notes:
Contributor: NB

os.name=            "AIX"                          "aix"
os.arch=            "Power"                        "power"
os.version=         "4.3"                          "4.3"
java.vendor=        "IBM Corporation"              "ibm corporation"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.2"                        "1.1.2"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
Contributor: RG
My AIX 4.1.5 box with Java 1.1.4 reports:

osName                  = AIX
osArch                  = POWER_RS
osVersion               = 4.1
vendor                  = IBM Corporation
APIVersion              = 45.3
interpeterVersion       = 1.1.4


------------------------------------------------------
OS:             FreeBSD 2.2.2
Processor:      Intel Pentium
VM:             FreeBSD port of JDK1.0.2 (Jeff Hsu?)
Notes:          This is actually for FreeBSD with the JDK 1.0.2. It probably says Solaris
since it was a really early port.
Contributor: CA

os.name=            "Solaris"                      "solaris"
os.arch=            "sparc"                        "sparc"
os.version=         "2.x"                          "2.x"
java.vendor=        "Sun Microsystems Inc."        "sun microsystems inc."
java.class.version= "45.3"                         "45.3"
java.version=       "hsu:11/21/21-22:43"           "hsu:11/21/21-22:43"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:             FreeBSD 2.2.2
Processor:      Intel Pentium
VM:             JDK1.1.6 FreeBSD port
Notes:
Contributor: CA

os.name=            "FreeBSD"                      "freebsd"
os.arch=            "x86"                          "x86"
os.version=         "2.2.2-RELEASE"                "2.2.2-release"
java.vendor=        "Sun Microsystems Inc., port by java-port@FreeBSD.org""sun microsystems inc., port by java-port@freebsd.org"
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.6"                        "1.1.6"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          IRIX 6.3               
Processor:   MIPS R10000            
VM:          JDK 1.1.6              
Notes:
Contributor: YA

os.name=            "Irix"                         "irix"
os.arch=            "mips"                         "mips"
os.version=         "6.3"                          "6.3"
java.vendor=        "Silicon Graphics Inc."        "silicon graphics inc."
java.class.version= "45.3"                         "45.3"
java.version=       "3.1.1 (Sun 1.1.6)"            "3.1.1 (sun 1.1.6)"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"


------------------------------------------------------
OS:          DIGITAL UNIX 4.0       
Processor:   ALPHA 
VM:          JDK 1.1.5       
Notes:
Contributor: MK

os.name=            "Digital Unix"                 "digital unix"
os.arch=            "alpha"                        "alpha"
os.version=         "4.0"                          "4.0"
java.vendor=        "Digital Equipment Corp."      "digital equipment corp."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.5"                        "1.1.5"
file.separator=     "/"                            "/"
path.separator=     ":"                            ":"
line.separator=     "0xa"                          "0xa"






--------------------------------------------------------------------------------


Other Platforms



------------------------------------------------------
OS:          NetWare 4.11       
Processor:   Pentium 200 
VM:          Novell JVM for NetWare 1.1.5      
Notes:
Contributor: FJ

os.name=            "NetWare 4.11"                 "netware 4.11"
os.arch=            "x86"                          "x86"
os.version=         "4.11"                         "4.11"
java.vendor=        "Novell Inc."                  "novell inc."
java.class.version= "45.3"                         "45.3"
java.version=       "1.1.5 "                       "1.1.5 "
file.separator=     "\"                            "\"
path.separator=     ";"                            ";"
line.separator=     "0xd,0xa"                      "0xd,0xa"
分享到:
评论

相关推荐

    Java中通过System.getProperties()获取系统参数测试.docx

    - **操作系统的名称** (`os.name`):指出了当前操作系统的名称,如“Windows 10”、“Linux”等。 - **操作系统的构架** (`os.arch`):显示了当前操作系统的架构类型,如“amd64”、“i386”等。 - **操作系统的版本...

    Java中System.getProperty的使用

    这些属性包括但不限于操作系统、Java运行环境版本、安装目录等关键信息,对于理解和调试程序运行环境有着不可替代的作用。 ### System.getProperty的使用 #### 1. 基础用法 `System.getProperty`方法接受一个字符...

    获取系统中各变量

    Java系统属性是一组预定义的键值对,它们提供了关于Java运行环境及其主机操作系统的详细信息。这些属性可以被应用程序动态地访问和修改,为开发者提供了一个深入了解其代码执行环境的窗口。系统属性可以通过`System`...

    在Java中获取系统属性

    - **操作系统信息**:如操作系统名称(`os.name`)、操作系统版本(`os.version`)等。 - **Java环境信息**:如Java安装目录(`java.home`)、JDK安装目录(`java.ext.dirs`)等。 - **文件系统信息**:如文件分隔符(`file....

    java设置http代理

    System.out.println("操作系统版本:" + props.getProperty("os.version")); System.out.println("文件分隔符:" + props.getProperty("file.separator")); // Unix 系统为 / System.out.println("路径分隔符:" + ...

    getproperties

    java读取配置文件,取得配置文件键值对的值,配置文件存放方法

    System Lambda是一个函数集合,用于测试使用javalangSystem的代码.zip

    `java.lang.System` 是Java标准库中的一个核心类,它提供了一系列静态方法,用于系统级的操作,如获取系统属性、标准输入/输出流以及时间管理等。在进行与系统交互相关的单元测试时,由于 `System` 类的静态方法特性...

    修改mail源码 支持socks代理

    修改mail源码 支持socks... System.getProperties().setProperty("netease.mail.socks.proxy.url", "代理服务器url"); System.getProperties().setProperty("netease.mail.socks.proxy.port", "代理服务器端口"); }

    windows操作系统中的系统属性.docx

    ### Windows操作系统中的系统属性 #### 概述 在Windows操作系统中,系统属性是关于系统配置的一系列关键信息,包括但不限于操作系统版本、硬件架构等。这些属性对于开发人员来说非常重要,因为它们可以帮助理解...

    JAVA获取操作系统信息

    7. **操作系统属性**:`System.getProperties()`方法返回一个`Properties`对象,其中包含了操作系统相关的属性,如`os.name`(操作系统名称)、`os.version`(操作系统版本)和`os.arch`(操作系统架构)。...

    用Java实现HTTP文件队列下载.pdf

    System.getProperties().put("proxyHost", "10.154.134.110"); System.getProperties().put("proxyPort", "8080"); ``` 网络资源的保存 在上节中,我们已经获取了指定网络资源的输入流,接下来我们要完成的就是读取...

    java system类使用方法示例 获取系统信息

    Java中的System类是Java语言的核心类之一,它包含了一些用于操作系统的全局变量和静态方法,主要功能是获取和设置系统相关信息。System类是final的,这意味着我们无法对其进行扩展,同时,由于它没有公共构造器,...

    java获取系统参数

    Java提供了`java.lang.System`类的`getProperties()`方法来获取这些信息。这个方法返回一个`Properties`对象,该对象包含了关于Java运行时环境的各种属性。这些属性包括但不限于Java版本、JVM实现、操作系统信息、...

    environmentANDarguments

    环境主要指的是操作系统级别的设置,而参数则涉及Java虚拟机(JVM)层面的配置。 **环境(Environment)** 环境变量是操作系统级别的配置,它们提供了运行应用程序所需的基本信息。例如,`PATH`变量指示系统在何处...

    Java获取系统信息

    在Java开发中,有时我们需要获取运行时系统的相关信息,比如IP地址、网卡地址、操作系统账户以及操作系统版本等。这些信息对于日志记录、故障排查和环境配置等方面都有着重要的作用。本文将详细介绍如何通过Java代码...

    chenyeshen#docisfy_blog#SpringBoo配置文件加载1

    1、命令行参数 2、来自java:comp/env的JNDI属性 3、Java系统属性(System.getProperties()) 4、操作系统环境变量 5

    JAVAMAIL实例

    - **`setSmtpHost`** 方法用于设置SMTP服务器地址,通过`System.getProperties()`获取系统属性并设置SMTP主机。 - **`createMimeMessage`** 方法创建MIME邮件对象,初始化会话对象和MIME消息体。 ##### 4.2 SMTP...

    linux中java获取路径的实例代码

    利用此对象,我们可以获取用户主目录(user.home)、Java运行环境安装目录(java.home)、操作系统名称(os.name)等信息。这些属性对于文件操作和程序配置非常有用。 例如,要想在Java中获取用户的主目录,可以使用以下...

    java显示当前运行时的参数(java运行参数)

    在Java编程语言中,有时我们需要查看程序在运行时所使用的参数,这可以帮助我们了解和...通过使用`System.getProperties()`和`System.getenv()`,我们可以获取到关于操作系统、Java环境以及自定义的JVM参数等关键信息。

Global site tag (gtag.js) - Google Analytics