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

前端 未结 4 1556
春和景丽
春和景丽 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 01:21

    If you have compiled for Java 1.6, you need at least OpenJDK 1.6. There are rare cases where Hotspot and OpenJDK are different but since Hotspot is based on the OpenJDK you are more likely to see minor differences in build versions.

    Both JVMs comply with the JLS spec and IMHO are practically reference implementations. The OpenJDK is the open standard and a HotSpot is widely used as the commercial standard. The releases are almost exactly the same.

    You can install the same version of Hotspot on Ubuntu if this is a real concern.

提交回复
热议问题