在JDK 6中编译并在JDK7上运行的Java字节代码是否可以在JDK 7中修复漏洞? [英] Is Java byte code compiled in JDK 6 and runs on JDK7 open to vulnerability fixed in JDK 7?

查看:277
本文介绍了在JDK 6中编译并在JDK7上运行的Java字节代码是否可以在JDK 7中修复漏洞?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题的动机很简单:不幸的是,Oracle停止了Java 6的开发,并且不会提供任何额外的构建。
如果Oracle发现任何安全问题,他们将仅在Java 7中修复它。
我们有一个用Java 6开发的大项目,我没有资源将其转换为Java 7。

The motivation of my question is simple: Unfortunately Oracle stopped development of Java 6 and will not provide any additional build. If Oracle will discover any security issue they will fix it only in Java 7. We have big project that developed in Java 6 and I do not have resources to convert it to Java 7.

所以,我想在JDK 6(6u45)的最后一个版本中编译代码,并在最新版本的JDK 7中运行它。

So, I want to compile the code in last build of JDK 6 (6u45) and to run it in most updated build of JDK 7.

在这种情况下,我的字节代码是否会对JDK 7中修复的漏洞开放?

Is in this case my byte code will be open to vulnerability fixed in JDK 7?

已添加

Oracle Java SE重要补丁更新示例:
http://www.oracle.com/technetwork/topics/security/javacpuapr2013-1928497.html

The example of Oracle Java SE Critical Patch Update: http://www.oracle.com/technetwork/topics/security/javacpuapr2013-1928497.html

不幸的是,下一个安全补丁将不会应用于JDK 6.

Unfortunately, the next security patches will be not be applied to JDK 6.

因此,更新的问题是:
我应该使用最新的JRE 7运行我的代码而无需重新编译我的Java 6字节代码?
或者我应该使用最新的JDK重新编译我的代码并使用最新的JRE运行它?

So, the updated question is: Should I run my code using the latest JRE 7 without recompile my Java 6 byte code? Or should I recompile my code using latest JDK and also to run it using the latest JRE?

推荐答案

如果漏洞存在于虚拟机或API中,如果您使用Java 7运行它,则不会对此漏洞开放。如果它位于编译器中,您可以通过使用Java 7编译漏洞来修复漏洞。

If the vulnerabilities are in the virtual machine or the API, it isn't open to the vulnerability if you run it with Java 7. If it is in the compiler, you can fix the vulnerability by compiling it with Java 7.

这篇关于在JDK 6中编译并在JDK7上运行的Java字节代码是否可以在JDK 7中修复漏洞?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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