Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve Java vendor information

Tags:

java

How can I retrieve Java vendor information without having to compile and run following script:

import java.util.Properties; public class test {     public static void main(String args[])     {             Properties prop = System.getProperties();             System.out.println ("JVM Vendor : " + prop.getProperty("java.vendor") );     } } 

I couldn't find it in command line options.

like image 348
J33nn Avatar asked Aug 14 '13 10:08

J33nn


People also ask

How to check Java vendor?

You can now find the Java version and vendor under the System Properties tab.

Who is the vendor for Java?

The primary reference Java VM implementation is HotSpot, produced by Oracle Corporation and many other big and medium-sized companies (e.g. IBM, Redhat, Microsoft, Azul, SAP).

What is a JDK vendor?

JDK vendors are companies who produce a version of the Java Development Kit. Gone are the days where we used to have just a single version by Oracle, we've now got multiple versions.


1 Answers

Note: The following will work for the Oracle JVM - not tested on others. (To get details on non-standard options execute java -X)

You can use the non-standard -XshowSettings flag to show all settings, or alternatively -XshowSettings:properties to show all property settings.

So for example if you execute the following command:

java -XshowSettings:properties -version 

This will show you all properties one of which is java.vendor. Not sure if it is possible to get it to output just a single property though.

like image 99
DB5 Avatar answered Oct 02 '22 07:10

DB5