Is it possible to compile java using Oracle JDK and run the code on OpenJDK?

前端 未结 4 1567
春和景丽
春和景丽 2021-02-14 00:41

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 th

4条回答
  •  逝去的感伤
    2021-02-14 00:59

    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

提交回复
热议问题