简体   繁体   中英

How do I find details about the OpenJDK Provider from Command Line

There are many providers of OpenJDK, Namely Amazon – Corretto, Azul, IBM, Oracle, RedHat etc.

OpenJDK came per-installed with my OS. So, I have no idea regarding my OpenJDK provider.

When I Query for the version it shows -

blueray@blueray-i58600K:~$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

How can I confirm the identity of my OpenJDK provider?

Type jshell at the command-line.

Copy-Paste the Following Lines in the REPL -

System.out.println("java Vendor URL : "+System.getProperty("java.vendor.url"));
System.out.println("java Vendor : "+System.getProperty("java.vendor"));
System.out.println("java Version : "+System.getProperty("java.version"));
System.out.println("Java Runtime Name : "+System.getProperty("java.runtime.name"));
System.out.println("Java Runtime Version : "+System.getProperty("java.runtime.version"));
System.out.println("Java Runtime Version : "+Runtime.version());
System.out.println("Java Virtual Machine Specification Name : "+System.getProperty("java.vm.specification.name"));
System.out.println("Java Virtual Machine Specification Version  : "+System.getProperty("java.vm.specification.version")); 
System.out.println("Java Virtual Machine Specification Vendor : "+System.getProperty("java.vm.specification.vendor"));
System.out.println("Java Virtual Machine Implementation Name : "+System.getProperty("java.vm.name"));
System.out.println("Java Virtual Machine Implementation Version : "+System.getProperty("java.vm.version"));
System.out.println("Java Virtual Machine Implementation Vendor : "+System.getProperty("java.vm.vendor"));

Press Enter

References

Which JRE I am using

How to know if I am using Open JDK or Oracle JDK?

How to printout all the system variables , for example java.class.path

How to find the JVM version from a program?

Essential Classes > The Platform Environment

Apology and Disclaimer: I apologize because I am sure I missed some references.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM