jvm次要版本vs编译器次要版本 [英] jvm minor version vs compiler minor version

查看:102
本文介绍了jvm次要版本vs编译器次要版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当JVM运行用JDK编译的具有与JVM相同的主要版本但较高的次要版本的类时,JVM会抛出异常吗?

Will JVM throw exception when it runs classes compiled with a JDK that has same major version but higher minor version compared to JVM ?

推荐答案

JDK版本并不重要,

The JDK version does not really matter, the class file format version does. So far, the minor version of the class file format hasn't been used, and changes in the major version have always corresponded with major JDK release (counting 1.2 -> 1.3 -> 1.4 as major releases).

此外,javac-target选项可用于生成与较早的运行时兼容的类文件.

Additionally, the -target option of javac can be used to produce class files compatible with older runtimes.

这篇关于jvm次要版本vs编译器次要版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆