OpenJDK的提供商很多,即Amazon – Corretto,Azul,IBM,Oracle,RedHat等。
OpenJDK随我的操作系统一起安装。因此,我对我的OpenJDK提供程序一无所知。
查询版本时显示-
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)
如何确认我的OpenJDK提供者的身份?
答案 0 :(得分:0)
在命令行中输入jshell
。
在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"));
按 Enter
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
道歉和免责声明:,我很抱歉,因为我确定自己错过了一些参考文献。