是否可以使用Oracle JDK编译java并在OpenJDK上运行代码? [英] Is it possible to compile java using Oracle JDK and run the code on OpenJDK?

查看:151
本文介绍了是否可以使用Oracle JDK编译java并在OpenJDK上运行代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那么可以在Windows 7机器上进行Java守护进程(Apache Daemon)的所有开发,然后在安装了OpenJDK的Ubuntu服务器上安装该服务(仍然需要搜索如何做到这一点)吗? p>

如果是,我如何在两个系统上识别兼容的Java版本?我的意思是如果我在Windows上使用Java 1.6,那么我在Ubuntu服务器上应该具有的兼容性最差的OpenJDK版本是什么?

解决方案

大多数情况下是的,但对于极端情况,它取决于并且应该在与生产配置密切匹配的舞台上进行仔细测试。



以下是发生编译器崩溃和测试失败的示例在OpenJDK上,当Oracle JDK构建时,源的相同快照为绿色:



http://travis-ci.org/#!/plokhotnyuk/actors/builds/1948184



http://travis-ci.org/#!/plokhotnyuk/ calculator / builds / 1948194


So is it possible to do all the development of a Java daemon (Apache Daemon) on a Windows 7 machine, then install the service on Ubuntu server (still have to search how to do that) which has OpenJDK installed ?

If yes, how can I identify the compatible versions of Java on both systems ? I mean if I'm using Java 1.6 on windows, what is the least compatible OpenJDK version I should have on Ubuntu server ?

解决方案

Mostly yes, but for corner cases it depends and should be carefully tested on stage that match closely to production configuration.

Here are examples of compiler crash and test failure that occurs on OpenJDK, while the same snapshot of sources are green when build by Oracle JDK:

http://travis-ci.org/#!/plokhotnyuk/actors/builds/1948184

http://travis-ci.org/#!/plokhotnyuk/calculator/builds/1948194

这篇关于是否可以使用Oracle JDK编译java并在OpenJDK上运行代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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