Lista de propriedades para uso com System.getProperty

Para ober informações sobre o sistema e até mesmo sua aplicação, um recurso muito interessante é o comando System.getProperty(“nome da propriedade”)
Segue abaixo lista com as propriedades disponíveis:

Key Description of Associated Value
java.version Java Runtime Environment version
java.vendor Java Runtime Environment vendor
java.vendor.url Java vendor URL
java.home Java installation directory
java.vm.specification.version Java Virtual Machine specification version
java.vm.specification.vendor Java Virtual Machine specification vendor
java.vm.specification.name Java Virtual Machine specification name
java.vm.version Java Virtual Machine implementation version
java.vm.vendor Java Virtual Machine implementation vendor
java.vm.name Java Virtual Machine implementation name
java.specification.version Java Runtime Environment specification version
java.specification.vendor Java Runtime Environment specification vendor
java.specification.name Java Runtime Environment specification name
java.class.version Java class format version number
java.class.path Java class path
java.library.path List of paths to search when loading libraries
java.io.tmpdir Default temp file path
java.compiler Name of JIT compiler to use
java.ext.dirs Path of extension directory or directories
os.name Operating system name
os.arch Operating system architecture
os.version Operating system version
file.separator File separator (“/” on UNIX)
path.separator Path separator (“:” on UNIX)
line.separator Line separator (“\n” on UNIX)
user.name User’s account name
user.home User’s home directory
user.dir User’s current working directory

Aqui o resultado delas:

java.version: 1.5.0_07
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.home: /usr/local/jdk1.5.0_07/jre
java.vm.specification.version: 1.0
java.vm.specification.vendor: Sun Microsystems Inc.
java.vm.specification.name: Java Virtual Machine Specification
java.vm.version: 1.5.0_07-b03
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) Client VM
java.specification.version: 1.5
java.specification.vendor: Sun Microsystems Inc.
java.specification.name: Java Platform API Specification
java.class.version: 49.0
java.class.path: /workspace/Atualizador/bin:/workspace/Atualizador/lib/postgresql-jdbc.jar
java.library.path: /usr/local/jdk1.5.0_07/jre/lib/
java.io.tmpdir: /tmp
java.compiler: null
java.ext.dirs: /usr/local/jdk1.5.0_07/jre/lib/ext
os.name: Linux
os.arch: i386
os.version: 2.6.20-15-generic
file.separator: /
path.separator: :
line.separator:
user.name: igo
user.home: /home/igo
user.dir: /workspace/Atualizador

Be Sociable, Share!

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *