OpenJDKの互換性について

投稿日:

このページについて

Oracle JDKがJava 11以降は開発・テスト目的のみとなり、本番環境での使用は有償になりました。 そこで、無料で使える代替のOpenJDKに注目が集まっています。

その互換性について調べてみました。

JDK 6の頃にOpenJDKは評価済

日本の情報処理推進機構(IPA)によってOpenJDK 6と、Sun JDKの比較が行われています。

ただJDKがオープンソースになったのはJDK 7の途中で、OpenJDK 6はその逆移植です。 そのため、今は当時より互換性が増しているのは間違いありません。

気になるのがWikipediaにもありますが、SNMPですね。 おそらくSNMP agentのとこかと思いますが。OpenJDK 11で消えてますね。

Oracleの見解

公式見解と言えるのは、以下のブログの情報です。

It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle’s implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.

違う点として、Javaプラグイン、Java Web Start、クローズドなサードパーティコンポーネント、 オープンソースなサードパーティコンポーネント(Rhinoなど)が挙げられているようです。

この記述でピンときたのですが、Javaプラグイン、Java Web Start、 JavaScriptエンジン(Rhino → Nashorn)は全て最近消えた機能ですね。

評価は必要だが、ほぼ問題なさそう

最初のIPAの評価はJDK 6の頃で、現状は違う可能性が高いです(主に良い意味で)。 またどちらにしても、本番環境で動かすには評価は必要でしょう。

ただ、問題が出る可能性は低いと思います。 Oracle Java 8の無料サポートの終了も近いので、さっさと動かした方が良さそうです。

辞書