how to check jre version using java application

前端 未结 6 926
死守一世寂寞
死守一世寂寞 2020-12-19 01:49

i have made an application in JDK7, but the jre6 is still using in the market, and if i send my jar file to someone with jre6, it wont work, is there a way that application

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 02:17

    System.getProperty("java.version")
    
    • Demo

    Note: It will return current jvm's version, jvm on which this code is executing, If you have java6 & java7 installed on your computer and you are running this code on java 7 it will show you version 7

提交回复
热议问题