java 查看jdk的版本信息
要查看JDK的版本信息,可以使用以下命令:
在命令行中输入 java -version
这将显示JDK的版本信息,包括版本号和其他相关信息。
另外,你也可以在Java程序中使用 System.getProperty("java.version") 方法来获取JDK的版本信息。例如:
public class Main {
public static void main(String[] args) {
String javaVersion = System.getProperty("java.version");
System.out.println("JDK版本信息:" + javaVersion);
}
}
运行以上程序将打印出JDK的版本信息。
原文地址: https://www.cveoy.top/t/topic/iYml 著作权归作者所有。请勿转载和采集!