Thursday, March 19, 2015

How to get JAVA vendor information and properties of java installed



How to get JAVA vendor information



On Linux or Unix , you can use below command to get JAVA VENDOR information like JAVA proprietary information. Example

java.vendor = Oracle Corporation



Command :-   


$ java -XshowSettings:properties -version 2> /tmp/file1.txt ; cat /tmp/file1.txt | grep java.vendor"


How to check version of JAVA installed



Command :-    $ java -version




How to check Properties of JAVA installed

 

[myuser@localhost ~]$ java -XshowSettings:properties -version

Property settings:
    awt.toolkit = sun.awt.X11.XToolkit
    file.encoding = UTF-8
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = .
    java.class.version = 51.0
    java.endorsed.dirs = /home/myuser/java/jdk1.7.0_75/jre/lib/endorsed
    java.ext.dirs = /home/myuser/java/jdk1.7.0_75/jre/lib/ext
        /usr/java/packages/lib/ext
    java.home = /home/myuser/java/jdk1.7.0_75/jre
    java.io.tmpdir = /tmp
    java.library.path = /usr/java/packages/lib/amd64
        /usr/lib64
        /lib64
        /lib
        /usr/lib
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.7.0_75-b13
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.7
    java.vendor = Oracle Corporation
    java.vendor.url = http://java.oracle.com/
    java.vendor.url.bug = http://bugreport.sun.com/bugreport/
    java.version = 1.7.0_75
    java.vm.info = mixed mode
    java.vm.name = Java HotSpot(TM) 64-Bit Server VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.7
    java.vm.vendor = Oracle Corporation
    java.vm.version = 24.75-b04
    line.separator = \n
    os.arch = amd64
    os.name = Linux
    os.version = 2.6.32-431.23.3.el6.x86_64
    path.separator = :
    sun.arch.data.model = 64
    sun.boot.class.path = /home/myuser/java/jdk1.7.0_75/jre/lib/resources.jar
        /home/myuser/java/jdk1.7.0_75/jre/lib/rt.jar
        /home/myuser/java/jdk1.7.0_75/jre/lib/sunrsasign.jar
        /home/myuser/java/jdk1.7.0_75/jre/lib/jsse.jar
        /home/myuser/java/jdk1.7.0_75/jre/lib/jce.jar
        /home/myuser/java/jdk1.7.0_75/jre/lib/charsets.jar
        /home/myuser/java/jdk1.7.0_75/jre/lib/jfr.jar
        /home/myuser/java/jdk1.7.0_75/jre/classes
    sun.boot.library.path = /home/myuser/java/jdk1.7.0_75/jre/lib/amd64
    sun.cpu.endian = little
    sun.cpu.isalist =
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = UTF-8
    sun.management.compiler = HotSpot 64-Bit Tiered Compilers
    sun.os.patch.level = unknown
    user.country = US
    user.dir = /home/myuser/
    user.home = /home/myuser/
    user.language = en
    user.name = myuser
    user.timezone =
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)