博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Kotlin程序用于打印JVM版本的Kotlin(打印Java属性)
阅读量:2545 次
发布时间:2019-05-11

本文共 1963 字,大约阅读时间需要 6 分钟。

Here, we will create a Kotlin program to print Kotlin, JVM version (printing Java properties). As Kotlin can be seen as an upgrade of Java, so we will get all versions of java (JVM) using Kotlin also.

在这里,我们将创建一个Kotlin程序以打印JVM版本的Kotlin(打印Java属性) 。 由于Kotlin可以看作是Java的升级,因此我们也将使用Kotlin获得所有版本的Java(JVM)。

在Kotlin中打印Java系统属性的程序 (Program to print Java System properties in Kotlin)

package com.includehelp.basic// Main Function Entry Point of Programfun main(args: Array
) { println("Kotlin Version : ${KotlinVersion.CURRENT} ") println("Java Version : ${ System.getProperty("java.version") } ") println("Java VM Version : ${ System.getProperty("java.vm.version") } ") println("Java VM Vendor : ${ System.getProperty("java.vm.vendor") } ") println("Java VM Name : ${ System.getProperty("java.vm.name") } ") println("Java VM specification Version : ${ System.getProperty("java.vm.specification.version") }" ) println("Java VM specification Vendor : ${ System.getProperty("java.vm.specification.vendor") }" ) println("Java VM specification Name : ${ System.getProperty("java.vm.specification.name") }" ) println("Java Runtime specification Version : ${ System.getProperty("java.specification.version") }" ) println("Java Runtime specification Vendor : ${ System.getProperty("java.specification.vendor") }" ) println("Java Runtime specification Name : ${ System.getProperty("java.specification.name") }" )}

Output

输出量

Kotlin Version  : 1.3.71Java Version     : 1.8.0_66Java VM Version  : 25.66-b18Java VM Vendor   : Oracle CorporationJava VM Name     : Java HotSpot(TM) 64-Bit Server VMJava VM specification Version : 1.8Java VM specification Vendor  : Oracle CorporationJava VM specification Name    : Java Virtual Machine SpecificationJava Runtime specification Version : 1.8Java Runtime specification Vendor  : Oracle CorporationJava Runtime specification Name    : Java Platform API Specification

翻译自:

转载地址:http://owxzd.baihongyu.com/

你可能感兴趣的文章
Hbase记录-client访问zookeeper大量断开以及参数调优分析(转载)
查看>>
代码片段收集
查看>>
vue-cli3创建项目时报错
查看>>
输入1-53周,输出1-53周的开始时间和结束时间
查看>>
实验二
查看>>
shell——按指定列排序
查看>>
crash 收集
查看>>
507 LOJ 「LibreOJ NOI Round #1」接竹竿
查看>>
UI基础--烟花动画
查看>>
2018. 2.4 Java中集合嵌套集合的练习
查看>>
精通ASP.NET Web程序测试
查看>>
vue 根据不同属性 设置背景
查看>>
51Nod1601 完全图的最小生成树计数 Trie Prufer编码
查看>>
Codeforces 1110D. Jongmah 动态规划
查看>>
android驱动在win10系统上安装的心酸历程
查看>>
优雅的程序员
查看>>
oracle之三 自动任务调度
查看>>
Android dex分包方案
查看>>
ThreadLocal为什么要用WeakReference
查看>>
删除本地文件
查看>>