
Javaは、アプリケーションソフトウェアの開発とクロスプラットフォームコンピューティング環境への展開を可能にするソフトウェアプラットフォームを提供する、一連のコンピュータソフトウェアおよび仕様です。Javaは、組み込み機器や携帯電話からエンタープライズサーバーやスーパーコンピュータまで、幅広いコンピューティングプラットフォームで使用されています。スタンドアロンのJavaアプリケーションほど一般的ではありませんが、Javaアプレットは、 HTMLページに埋め込むことでネイティブアプリケーションの多くの機能を提供するために、安全なサンドボックス環境で実行されるのが一般的でした。
Java プログラミング言語で記述することは、 Java 仮想マシン(JVM)にバイト コードとしてデプロイされるコードを生成する主な方法です。バイト コードコンパイラは、 Ada、JavaScript、Kotlin (Google が推奨する Android 言語)、Python、Rubyなど、他の言語でも利用可能です。さらに、Clojure、Groovy、Scalaなど、 JVM 上でネイティブに実行するように設計された言語もいくつかあります。Javaの構文はCとC++から多くを借用していますが、オブジェクト指向機能はSmalltalkとObjective-Cをモデルにしています。[ 9 ] Java はポインタなどの特定の低レベル構造を避け、オブジェクトがヒープに割り当てられる ( Oracle が現在サポートしている実装など、一部の実装では代わりにエスケープ解析最適化を使用してスタックに割り当てる場合があります)非常にシンプルなメモリ モデルを持ち、オブジェクト型のすべての変数は参照です。メモリ管理は、 JVM によって実行される統合された自動ガベージ コレクションによって処理されます。
最新バージョンは、 2026年3月にリリースされたJava 26です。
最新の長期サポート(LTS) バージョンであるJava 25 は2025 年 9 月にリリースされ、Java 8 LTS までサポートされている数少ない LTS バージョン 1 つです。Oracle の Java 6 の延長サポートは 2018 年 12 月に終了しました。[ 10 ]
As an open source platform, Java has many distributors, including Amazon, IBM, Azul Systems, and AdoptOpenJDK. Distributions include Amazon Corretto, Zulu, AdoptOpenJDK, and Liberica. Regarding Oracle, it distributes Java 8, and also makes available e.g. Java 11, both also currently supported LTS versions. Oracle (and others) "highly recommend that you uninstall older versions of Java" than Java 8,[11] because of serious risks due to unresolved security issues.[12][13][14]
Since Java 9 (as well as versions 10, 12–16, 18–20, and 22–24) are no longer supported, Oracle advises its users to "immediately transition" to a supported version.
Oracle released the last free-for-commercial-use public update for the legacy Java 8 LTS in January 2019, and will continue to support Java 8 with public updates for personal use indefinitely.
The Java platform is a suite of programs that facilitate developing and running programs written in the Java programming language. A Java platform includes an execution engine (called a virtual machine), a compiler and a set of libraries; there may also be additional servers and alternative libraries that depend on the requirements. Java platforms have been implemented for a wide variety of hardware and operating systems with a view to enable Java programs to run identically on all of them.
The Java platform consists of several programs, each of which provides a portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java bytecode (an intermediate language for the JVM), is provided as part of the Java Development Kit (JDK). The Java Runtime Environment (JRE), complementing the JVM with a just-in-time (JIT) compiler, converts intermediate bytecode into native machine code on the fly. The Java platform also includes an extensive set of libraries.
The essential components in the platform are the Java language compiler, the libraries, and the runtime environment in which Java intermediate bytecode executes according to the rules laid out in the virtual machine specification.
Different platforms target different classes of device and application domains:
Java Platform, Standard Edition (Java SE) is a computing platform, technical standard for execution of applications on independent Java-supported platforms as such portable code for desktop and server environments.[15][16] Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).
The platform uses the Java programming language and is part of the Java software-platform family. Java SE defines a range of general-purpose APIs—such as Java APIs for the Java Class Library—and also includes the Java Language Specification and the Java Virtual Machine Specification.[17]OpenJDK is the official reference implementation since version 7.[18][19][20]
Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE[21] with specifications for enterprise features such as distributed computing and web services.[22] Jakarta EE applications are run on reference runtimes, which can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are deploying.
Javaプラットフォームの中核は、Javaバイトコードプログラムを実行する「仮想マシン」です。このバイトコードは、プログラムが実行されるハードウェアやオペレーティングシステムに関係なく同じです。ただし、Java 10(およびそれ以前のバージョン)などの新しいバージョンでは、小さな変更が加えられているため、バイトコードは一般的に前方互換性のみを有しています。Java仮想マシン(JVM)内には、ジャストインタイム(JIT)コンパイラがあります。JITコンパイラは、実行時にJavaバイトコードをネイティブプロセッサ命令に変換し、実行中にネイティブコードをメモリにキャッシュします。
バイトコードを中間言語として使用することで、Java プログラムは仮想マシンが利用可能なあらゆるプラットフォームで実行できます。JIT コンパイラを使用することで、Java アプリケーションは、ロード中に少し遅延した後、すべてまたはほとんどが JIT コンパイルされて「ウォームアップ」されると、ネイティブ プログラムとほぼ同じ速度で実行される傾向があります。[ 23 ] [ 24 ] [ 25 ] JRE バージョン 1.2 以降、Sun の JVM 実装には、インタプリタの代わりにジャストインタイム コンパイラ が含まれています。
Javaプログラムはクロスプラットフォーム、つまりプラットフォームに依存しないものですが、これらのプログラムを実行するJava仮想マシン(JVM)のコードはそうではありません。サポートされているすべてのオペレーティングプラットフォームには、それぞれ独自のJVMがあります。
Java Development Kit (JDK) は、Javaプラットフォーム アプリケーションを開発するためのソフトウェア開発キットです。[ 26 ]
JDKは主にJavaランタイム環境(JRE)との通信を目的として設計されていますが、JREおよびJVMと通信できる他のJDKベースの言語に置き換えることも可能です。さらに、Javaバイトコードは、 JVMのみを使用して静的に直接ネイティブコードにコンパイルすることができ、Javaランタイム環境を動的に実行する必要はありません。
Java は、Java 言語仕様 (JLS) と Java 仮想マシン仕様 (JVMS) を実装し、Javaアプリケーション プログラミング インターフェイス(API) の標準版 (SE) を提供します。これは、Oracle が管理するコミュニティ主導のOpenJDKから派生したものです。[ 27 ] Java アプリケーションを操作するためのソフトウェアを提供します。含まれるソフトウェアの例としては、Java 仮想マシン、コンパイラ、パフォーマンス監視ツール、デバッガ、および Oracle が Java プログラマにとって有用だと考えるその他のユーティリティなどがあります。
Oracleは、Oracle No-Fee Terms and Conditions(NFTC)ライセンスに基づき、現行バージョンのソフトウェアをリリースしています。Oracleは、Windows、macOS、Linuxベースのオペレーティングシステム向けにx86-64アーキテクチャ用バイナリを、macOSおよびLinux向けにaarch64アーキテクチャ用バイナリをリリースしています。以前のバージョンでは、Oracle SolarisオペレーティングシステムおよびSPARCアーキテクチャをサポートしていました。
Oracleの主要なJVM実装はHotSpotとして知られています。
The Java Runtime Environment (JRE) released by Oracle is a freely available software distribution containing a stand-alone JVM (HotSpot), the Java standard library (Java Class Library), a configuration tool, and—until its discontinuation in JDK 9—a browser plug-in. It is the most common Java environment installed on personal computers in the laptop and desktop form factor. Mobile phones including feature phones and early smartphones that ship with a JVM are most likely to include a JVM meant to run applications targeting Micro Edition of the Java platform. Meanwhile, most modern smartphones, tablet computers, and other handheld PCs that run Java apps are most likely to do so through support of the Android operating system, which includes an open source virtual machine incompatible with the JVM specification. (Instead, Google's Android development tools take Java programs as input and output Dalvik bytecode, which is the native input format for the virtual machine on Android devices.) The last Critical Path Update version of JRE with an Oracle BCL Agreement[28] was 8u201 and, the last Patch Set Update version with the same license was 8u202.[29][30] The last Oracle JRE implementation, regardless of its licensing scheme, was 9.0.4.[31] Since Java Platform SE 9, the whole platform also was grouped into modules.[32] The modularization of Java SE implementations allows developers to bundle their applications together with all the modules used by them, instead of solely relying on the presence of a suitable Java SE implementation in the user device.[33][34][35][36]
ほとんどの最新のオペレーティングシステム(OS)では、プログラマの作業を簡素化するために、再利用可能なコードが大量に提供されています。このコードは通常、アプリケーションが実行時に呼び出すことができる動的にロード可能なライブラリのセットとして提供されます。Javaプラットフォームは特定のオペレーティングシステムに依存しないため、アプリケーションは既存のOSライブラリに頼ることはできません。代わりに、Javaプラットフォームは、最新のオペレーティングシステムで一般的に見られる多くの再利用可能な関数を含む、独自の標準クラスライブラリの包括的なセットを提供します。システムライブラリの大部分もJavaで記述されています。たとえば、Swingライブラリはユーザーインターフェイスを描画し、イベントを自身で処理するため、異なるプラットフォーム間でコンポーネントを処理する方法の多くの微妙な違いが解消されます。
Javaクラスライブラリは、Javaプラットフォーム内で3つの役割を果たします。まず、他の標準コードライブラリと同様に、Javaライブラリは、アイテムのリストの管理や複雑な文字列解析など、一般的なタスクを実行するためのよく知られた関数セットをプログラマに提供します。次に、クラスライブラリは、通常はハードウェアとオペレーティングシステムに大きく依存するタスクに対して、抽象的なインターフェースを提供します。ネットワークアクセスやファイルアクセスなどのタスクは、多くの場合、各プラットフォーム固有の実装と密接に結びついています。これらjava.netのjava.ioライブラリは、ネイティブOSコードで抽象化レイヤーを実装し、Javaアプリケーションがこれらのタスクを実行するための標準インターフェースを提供します。最後に、基盤となるプラットフォームがJavaアプリケーションが期待するすべての機能をサポートしていない場合、クラスライブラリは、代替機能を提供するエミュレーション、または少なくとも特定の機能の存在を確認する一貫した方法を提供することによって、欠落しているコンポーネントを適切に処理します。
「Java」という単語単独では、通常、Javaプラットフォームで使用するために設計されたJavaプログラミング言語を指します。プログラミング言語は通常、「プラットフォーム」というフレーズの範囲外ですが、Javaプログラミング言語はJava 7以前はJavaプラットフォームの中核部分として挙げられていました。そのため、言語とランタイムは一般的に単一のユニットとして考えられていました。しかし、Java 7仕様では、Java言語とJava仮想マシンをより明確に別々のエンティティとして扱うようにする努力がなされ、もはや単一のユニットとは見なされなくなりました。[ 37 ]
サードパーティは、JVMをターゲットとする多くのコンパイラやインタプリタを開発してきました。これらの中には既存の言語向けのものもあれば、Java言語の拡張機能向けのものもあります。これらには以下が含まれます。
The success of Java and its write once, run anywhere concept has led to other similar efforts, notably the .NET Framework, appearing since 2002, which incorporates many of the successful aspects of Java. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language, although many other languages have been made for JVM since. Like Java, .NET languages compile to byte code and are executed by the Common Language Runtime (CLR), which is similar in purpose to the JVM. Like the JVM, the CLR provides memory management through automatic garbage collection, and allows .NET byte code to run on multiple operating systems.
.NET included a Java-like language first named J++, then called Visual J# that was incompatible with the Java specification. It was discontinued 2007, and support for it ended in 2015.
The JVM specification gives a lot of leeway to implementors regarding the implementation details. Since Java 1.3, JRE from Oracle contains a JVM called HotSpot. It has been designed to be a high-performance JVM.
To speed-up code execution, HotSpot relies on just-in-time compilation. To speed-up object allocation and garbage collection, HotSpot uses generational heap.
The Java virtual machine heap is the area of memory used by the JVM for dynamic memory allocation.[39]
HotSpotでは、ヒープは世代に分割されます。
Java 8 より前は、クラス定義と関連するメタデータにパーマネントジェネレーション(またはpermgen ) が使用されていました。パーマネント ジェネレーションはヒープの一部ではありませんでした。[ 40 ] [ 41 ]パーマネントジェネレーションは Java 8 から削除されました。[ 42 ]
当初は永続的な生成はなく、オブジェクトとクラスは同じ領域に一緒に格納されていました。しかし、クラスのアンロードはオブジェクトの収集よりもはるかにまれにしか発生しないため、クラス構造を特定の領域に移動することでパフォーマンスが大幅に向上しました。[ 40 ]
Java JRE は多数のコンピュータにインストールされています。そのため、古いバージョンの JRE を使用しているエンドユーザーは、多くの既知の攻撃に対して脆弱です。このことから、Java は本質的に安全ではないという広く共有された認識が生まれました。[ 43 ] Java 1.7 以降、Oracle の JRE for Windows には自動更新機能が含まれています。
Java ブラウザ プラグインが廃止される前は、どの Web ページでも Java アプレットが実行される可能性があり、悪意のある Web サイトにとって攻撃しやすい領域となっていました。2013 年に Kaspersky Labs は、Java プラグインがコンピュータ犯罪者にとって好まれる方法であると報告しました。Java エクスプロイトは、ハッカーがハッキングした Web サイトに展開する多くのエクスプロイト パックに含まれています。[ 44 ] Java アプレットは、2018 年 9 月 25 日にリリースされた Java 11 で削除されました。

Javaは1990年12月にSun Microsystemsの社内プロジェクトとして始まり、C++/ Cプログラミング言語の代替となるものを提供しました。エンジニアのパトリック・ノートンは、SunのC++およびCアプリケーションプログラミングインターフェース(API)とツールの現状、そしてNeWSプロジェクトが組織によって扱われている方法にますます不満を募らせていました。ノートンはスコット・マクニーリーにSunを辞めてNeXTに移る計画を伝え、マクニーリーはノートンに自分が神であるかのように振る舞い、会社を立て直す方法を説明するメールを送ってほしいと頼みました。ノートンは、他のSunプロジェクトを停滞させていた官僚主義に縛られずに自律的に作業できる小規模チームの創設を構想していました。マクニーリーはメッセージをSunの他の重要な人物に転送し、ステルスプロジェクトが始まりました。[ 45 ]
ステルスプロジェクトはすぐにグリーンプロジェクトと改名され、ジェームズ・ゴスリングとマイク・シェリダンがノートンに加わった。彼らは他のエンジニアたちと共に、カリフォルニア州メンローパークのサンドヒルロードにある小さなオフィスで作業を開始した。彼らは次世代スマート家電をプログラミングするための新しい技術の開発を目指しており、サンはこれが大きな新たな機会をもたらすと期待していた。[ 46 ]
チームは当初C++の使用を検討したが、いくつかの理由から却下した。限られたリソースで組み込みシステムを開発していたため、C++はメモリを過剰に消費し、その複雑さゆえに開発者のミスにつながると判断したのだ。また、C++にはガベージコレクション機能がないため、プログラマーはシステムメモリを手動で管理する必要があり、これは困難でエラーが発生しやすい作業だった。さらに、セキュリティ、分散プログラミング、スレッド処理といった移植性の高い機能がC++には不足している点も懸念材料だった。そして何より、あらゆる種類のデバイスに容易に移植できるプラットフォームを求めていた。
ビル・ジョイは、MesaとCを組み合わせた新しい言語を構想していた。彼は「Further」という論文で、SunのエンジニアがC++をベースにしたオブジェクト指向環境を開発すべきだと提案した。当初、ゴスリングはC++を修正・拡張しようと試みた(彼はこれを「C++ ++ --」と呼んだ)が、すぐにそれを放棄し、オフィスのすぐ外に立っていた木にちなんでオークと名付けた新しい言語の作成に取り掛かった。 [ 47 ]
1992年の夏までに、チームはGreen OS 、Oak言語、ライブラリ、ハードウェアなど、新しいプラットフォームの一部をデモンストレーションできるようになった。1992年9月3日に行われた最初のデモンストレーションでは、 Star7という名の携帯情報端末(PDA)の構築に重点が置かれた。グラフィカルインターフェースと、ユーザーを支援する「デューク」と呼ばれるスマートエージェントを備えたデバイスがありました。その年の 11 月、グリーン プロジェクトはスピンオフして、サン マイクロシステムズの完全子会社であるFirstpersonとなり、チームはカリフォルニア州パロアルトに移転しました。[ 48 ] Firstperson チームは、高度にインタラクティブなデバイスの構築に興味を持っており、タイム ワーナーがセット トップ ボックスの提案依頼書(RFP)を発行したとき、Firstperson はターゲットを変更し、セット トップ ボックス プラットフォームの提案で応じました。しかし、ケーブル業界は、そのプラットフォームがユーザーに制御権を与えすぎていると感じたため、Firstperson はSGIに入札で敗れました。セット トップ ボックスに関するThe 3DO Companyとの追加の契約も実現しませんでした。テレビ業界で関心を集めることができなかったため、同社はサンに再編されました。

1994 年 6 月と 7 月、ジョン ゲージ(サン社の科学部長)、ゴスリング、ジョイ、ノートン、ウェインローシング、エリック シュミットとの 3 日間のブレインストーミングの後、チームはワールド ワイド ウェブ向けのプラットフォームを再ターゲットにした。彼らは、 Mosaicのようなグラフィカル ウェブブラウザの登場により、インターネットはケーブル テレビで構想していたのと同じ高度にインタラクティブなメディアに進化できると考えた。プロトタイプとして、ノートンは WebRunner (映画ブレード ランナーにちなんで名付けられた) という小さなブラウザを作成し、 1995 年にHotJava [ 46 ]と改名した。
サンは商標調査の結果、 Oak TechnologyがOakという名前を使用していることが判明したため、Oak言語をJavaに改名した。[ 49 ]サンは市場シェアを獲得するためにJavaライセンスを原価以下で販売した。[ 50 ] Java 1.0aは1994年にダウンロード可能になったが、Javaの最初の公開リリースであるHotJavaブラウザ付きのJava 1.0a2は、1995年5月23日にGageがSunWorldカンファレンスで発表した。Gageの発表に伴って、Netscape Communications CorporationのエグゼクティブバイスプレジデントであるMarc Andreessenは、NetscapeブラウザにJavaサポートが含まれることを予期せず発表した。1996年1月9日、サン・マイクロシステムズはJavaSoftグループを設立し、この技術の開発に着手した。[ 51 ]
ウェブブラウザ用のいわゆるJavaアプレットは、もはやJavaの最も一般的な用途(例えば、サーバーサイドでの使用が増えている)でも、クライアントサイドでコードを実行する最も一般的な方法(JavaScriptがより一般的になった)でもありませんが、JVMサポートが終了した後でも、TeaVMなどを使用して、ウェブブラウザでJava(またはKotlinなどの他のJVM言語)を実行することは依然として可能です。
2006年11月13日、サン・マイクロシステムズはJavaの実装の大部分をGNU一般公衆ライセンス(GPL)の下で公開した。[ 52 ] [ 53 ]
Java 言語は、1996 年 1 月 23 日に JDK ( Java Development Kit ) 1.0がリリースされて以来、いくつかの変更が加えられ、標準ライブラリ に多数のクラスとパッケージが追加されてきました。J2SE 1.4以降、Java Community Process (JCP) が Java 言語の進化を管理しています。JCP はJava Specification Requests (JSR) を使用して、Java プラットフォームへの追加と変更を提案および規定します。Java Language Specification (JLS) は言語を規定し、JLS の変更は JSR 901の下で管理されます。 [ 54 ]
サン・マイクロシステムズは1997年2月19日にJDK 1.1をリリースした。主な追加機能としては、Abstract Window Toolkit(AWT)イベントモデルの大幅な改良、言語への内部クラスの追加、 JavaBeans、およびJava Database Connectivity(JDBC)などが挙げられる。
J2SE 1.2 (1998 年 12 月 8 日) – コードネームPlayground 。このバージョンと、J2SE 5.0までの以降のリリースはJava 2と改名され、ベース プラットフォームを J2EE ( Java 2 Platform, Enterprise Edition )および J2ME ( Java 2 Platform, Micro Edition) と区別するために、バージョン名が JDK から J2SE ( Java 2 Platform, Standard Edition ) に変更されました。主な追加機能には、リフレクション、コレクションフレームワーク、Java IDL ( CORBA相互運用性のためのインターフェース記述言語実装)、およびSwingグラフィカル API のコア クラスへの統合が含まれます。Javaプラグインがリリースされました (その後、Web ブラウザー ベンダーはサポートを終了し、 Java コード ベースの削除により現在は非推奨となり、2026 年の Java 26 で削除される予定です[ 55 ] )。また、Sun の JVM には初めてJIT コンパイラが搭載されました。
J2SE 1.3 (2000 年 5 月 8 日) – コードネームKestrel。注目すべき変更点としては、HotSpot JVM (HotSpot JVM は J2SE 1.2 JVM 向けに 1999 年 4 月に初めてリリースされました)、JavaSound、Java Naming and Directory Interface (JNDI)、Java Platform Debugger Architecture (JPDA) のバンドル化が挙げられます。
J2SE 1.4 (2002 年 2 月 6 日) – コードネームMerlin 。これは、JSR 59として Java Community Process の下で開発された Java プラットフォームの最初のリリースとなりました。[ 56 ]主な変更点には、 Perlをモデルにした正規表現、例外連鎖、統合XMLパーサーおよびXSLTプロセッサ ( JAXP )、Java Web Startなどがありました。
J2SE 5.0 (2004 年 9 月 30 日) – コードネームTiger。当初は 1.5 という番号が付けられており、これは現在も内部バージョン番号として使用されています。[ 57 ] JSR 176 の下で開発された Tiger では、for-each ループ、ジェネリクス、オートボクシング、var-argsなど、いくつかの重要な新しい言語機能が追加されました。[ 58 ]
Java SE 6 (December 11, 2006) – Codename Mustang. It was bundled with a database manager and facilitates the use of scripting languages with the JVM (such as JavaScript using Mozilla's Rhino engine). As of this version, Sun replaced the name "J2SE" with Java SE and dropped the ".0" from the version number.[59] Other major changes include support for pluggable annotations (JSR 269), many GUI improvements, including native UI enhancements to support the look and feel of Windows Vista, and improvements to the Java Platform Debugger Architecture (JPDA) & JVM Tool Interface for better monitoring and troubleshooting.
Java SE 7 (July 28, 2011) – Codename Dolphin. This version developed under JSR 336.[60] It added many small language changes including strings in switch, try-with-resources and type inference for generic instance creation. The JVM was extended with support for dynamic languages, while the class library was extended among others with a join/fork framework,[61] an improved new file I/O library and support for new network protocols such as SCTP. Java 7 Update 76 was released in January 2015, with expiration date April 14, 2015.[62]
In June 2016, after the last public update of Java 7,[63] "remotely exploitable" security bugs in Java 6, 7, and 8 were announced.[13]
Java SE 8 (March 18, 2014) – Codename Kenai. Notable changes include language-level support for lambda expressions (closures) and default methods, the Project Nashorn JavaScript runtime, a new Date and Time API inspired by Joda Time, and the removal of PermGen. This version is not officially supported on the Windows XP platform,[64] but is known to work there. Thus, due to the end of Java 7's lifecycle it is the recommended version for XP users. Previously, only an unofficial manual installation method had been described for Windows XP SP3. It refers to JDK8, the developing platform for Java that also includes a fully functioning Java Runtime Environment.[65] Java 8 is supported on Windows Server 2008 R2 SP1, Windows Vista SP2 and Windows 7 SP1, Ubuntu 12.04 LTS and above (and some other OSes).[66]
Java SE 9 and 10 have higher system requirements, i.e. Windows 7 or Server 2012 (and web browser minimum certified is upped to Internet Explorer 11 or other web browsers), and Oracle dropped 32-bit compatibility for all platforms, i.e. only Oracle's "64-bit Java virtual machines (JVMs) are certified".[67]
Java SE 11 LTS was released September 2018, the first LTS release since the rapid release model was adopted starting with version 9. For the first time, OpenJDK 11 represents the complete source code for the Java platform under the GNU General Public License, and while Oracle still dual-licenses it with an optional proprietary license, there are no code differences nor modules unique to the proprietary-licensed version.[68] Java 11 features include two new garbage collector implementations, Flight Recorder to debug deep issues, a new HTTP client including WebSocket support.[69]
Java SE 12 was released March 2019.[70]
Java SE 13 was released September 2019.[71]
Java SE 14 was released March 2020.[72]
Java SE 15 was released September 2020.
Java SE 16 was released March 2021.
Java SE 17 LTS was released September 2021.
Java SE 18 was released March 2022.
Java SE 19 was released September 2022.
Java SE 20は2023年3月にリリースされました。
Java SE 21 LTSは2023年9月にリリースされました。
Java SE 22は2024年3月にリリースされました。
言語の変更に加えて、Java クラス ライブラリも長年にわたって大きく変更され、JDK 1.0 の数百クラスから J2SE 5.0 では 3,000 クラス以上に増えました。SwingやJava 2D などのまったく新しい API が進化し、元の JDK 1.0 のクラスやメソッドの多くが非推奨になりました(その中には、ファイナライゼーションに関連するものなど、完全に非推奨になったものもあります)。[ 73 ]
Java 22 では、少なくとも 1 つの非常にまれにしか使用されない API (スレッド用) が削除されました。[ 74 ] [ 75 ]

現在のJavaは、64ビット版Windows 10(およびServer 2016)以降、64ビット版macOS 13.x以降、および64ビット版Linux(Oracle Enterprise Linuxなど)でサポートされています。Oracleではビルドのサポートは提供されていませんが(IBM、SAPなどでは提供されている可能性があります)、AIX、Ubuntu、RHEL、Alphine/ muslなど、動作することが確認されている環境もあります。32ビット版WindowsのサポートはJava 22以降非推奨となり(32ビット版JVMはデフォルト以外のオプションを指定しないとビルドできなくなりました)。
Oracleによると、2010年にはJava Runtime Environmentが8億5000万台以上のPCに搭載されていた。[ 76 ] Microsoftは、Sun Microsystemsが、バンドルされたJavaランタイム環境にWindows固有のクラスを追加し、 Visual J++を通じて新しいクラスを利用できるようにしたとしてMicrosoftを訴えて以来、オペレーティングシステムにJava Runtime Environment(JRE)をバンドルしていない。Appleは、OS Xバージョン10.7以降、JavaランタイムをOS Xに含めなくなったが、JREを必要とするアプリケーションを初めて起動すると、システムはユーザーにダウンロードしてインストールするように促す。多くのLinuxディストリビューションは、デフォルトの仮想マシンとしてOpenJDKランタイムを含んでいるため、独自のOracle JREをダウンロードする必要がない。[ 77 ]
Javaアプリケーションの中には、NetBeans、Eclipse、JetBrains [ 78 ]などの統合開発環境や、 LimeWireやVuzeなどのファイル共有クライアントなど、デスクトップで広く使われているものがあります。Javaは、 MATLAB数学プログラミング環境でも、ユーザーインターフェースのレンダリングとコアシステムの一部として使用されています。Javaは、 Lotus Notesなどのハイエンドなコラボレーションアプリケーション向けにクロスプラットフォームのユーザーインターフェースを提供しています。
Oracleは、JDK 9でJava Runtime Environmentから個別にインストール可能なJavaブラウザプラグインをまず非推奨にし、その後将来のリリースから完全に削除し、Web開発者に代替技術の使用を強制する計画である。[ 79 ]

サン・マイクロシステムズがJava SEとJava MEをフリーソフトウェアライセンス(GNU General Public License )でリリースすると発表した際、同時にデュークのグラフィックをフリーBSDライセンスでリリースした。 [ 81 ]デュークの新しいキャラクターは毎年作られる。[ 82 ]例えば、2011年7月の「Future Tech Duke」は、鼻が大きく、ジェットパックと青い翼を装備していた。[ 83 ]
SunのJava実装(事実上のリファレンス実装)のソースコードは以前から入手可能でしたが、最近まで[ 84 ]ライセンス条項により、Sunとの契約に署名(および一般的には料金を支払う)しない限り、その使用が厳しく制限されていました。そのため、これらの条項はオープンソース・イニシアティブまたはフリーソフトウェア財団のいずれの要件も満たしておらず、オープンソースまたはフリーソフトウェアとみなされていなかったため、Sun Javaはプロプライエタリなプラットフォームでした。[ 85 ]
GNU ClasspathやApache Harmonyなど、いくつかのサードパーティプロジェクトがフリーソフトウェアによる部分的なJava実装を作成したが、Sunライブラリの規模の大きさとクリーンルーム方式の採用により、これらのプロジェクトによるJavaライブラリの実装(コンパイラとVMは比較的小さく、明確に定義されている)は不完全で、完全な互換性を欠いていた。また、これらの実装はSunの実装に比べて最適化がはるかに劣っていた。

Sun announced in JavaOne 2006 that Java would become free and open-source software,[86] and on October 25, 2006, at the Oracle OpenWorld conference, Jonathan I. Schwartz said that the company was set to announce the release of the core Java Platform as free and open source software within 30 to 60 days.[87]
Sun released the Java HotSpot virtual machine and compiler as free software under the GNU General Public License on November 13, 2006, with a promise that the rest of the JDK (that includes the JRE) would be placed under the GPL by March 2007 ("except for a few components that Sun does not have the right to publish in distributable source form under the GPL").[88] According to Richard Stallman, this would mean an end to the "Java trap".[89]Mark Shuttleworth called the initial press announcement, "A real milestone for the free software community".[90]
Sun released the source code of the Class library under GPL on May 8, 2007, except some limited parts that were licensed by Sun from third parties who did not want their code to be released under a free software and open-source license.[91] Some of the encumbered parts turned out to be fairly key parts of the platform such as font rendering and 2D rasterizing, but these were released as open-source later by Sun (see OpenJDK Class library).
Sun's goal was to replace the parts that remain proprietary and closed-source with alternative implementations and make the class library completely free and open source. In the meantime, a third-party project called IcedTea created a completely free and highly usable JDK by replacing encumbered code with either stubs or code from GNU Classpath. However OpenJDK has since become buildable without the encumbered parts (from OpenJDK 6 b10[92]) and has become the default runtime environment for most Linux distributions.[93][94][95][96]
In June 2008, it was announced that IcedTea6 (as the packaged version of OpenJDK on Fedora 9) has passed the Technology Compatibility Kit tests and can claim to be a fully compatible Java 6 implementation.[97]
Because OpenJDK is under the GPL, it is possible to redistribute a custom version of the JRE directly with software applications,[98][99] rather than requiring the enduser (or their sysadmin) to download and install the correct version of the proprietary Oracle JRE onto each of their systems themselves.
In most cases, Java support is unnecessary in Web browsers, and security experts recommend that it not be run in a browser unless absolutely necessary.[100] It was suggested that, if Java is required by a few Web sites, users should have a separate browser installation specifically for those sites.
When generics were added to Java 5.0, there was already a large framework of classes (many of which were already deprecated), so generics were chosen to be implemented using erasure to allow for migration compatibility and re-use of these existing classes. This limited the features that could be provided by this addition as compared to some other languages.[101][102] The addition of type wildcards made Java unsound.[103]
Javaにはネイティブの符号なし整数型がありません。符号なしデータはC言語で書かれたプログラムから生成されることが多く、これらの型がないためにC言語とJavaの間で直接データを交換できません。符号なしの大きな数値は暗号化を含む多くの数値処理分野でも使用されるため、Javaをこれらのタスクに使用するのは不便です。[ 104 ] 変換コードとより大きなデータ型を使用することでこの問題を部分的に回避することは可能ですが、Javaで符号なしデータを扱うのは面倒になります。32ビットの符号付き整数は16ビットの符号なし値を比較的簡単に保持できますが、32ビットの符号なし値には64ビットの符号付き整数が必要です。さらに、 Java言語には64ビットより大きい型が存在しないため、Javaのどの整数型を使用しても64ビットの符号なし値を格納できません。関数を使用して抽象化すると、他の言語ではネイティブな多くの操作で関数呼び出しが必要になります。あるいは、Javaの符号付き整数を使用して同じサイズの符号なし整数をエミュレートすることも可能ですが、これには複雑なビット演算に関する詳細な知識が必要です。[ 105 ]
Java の浮動小数点演算は、大部分がIEEE 754 (バイナリ浮動小数点演算の標準)に基づいているが、strictfp例外フラグや指向丸めなど、 IEEE 標準 754 で義務付けられている機能など、修飾子を使用してもサポートされない特定の機能がある。さらに、754 で許可され、多くのプロセッサに存在する拡張精度浮動小数点型は、Java では許可されていない。[ 106 ] [ 107 ]
Javaの初期( 2000年にJava 1.3でHotSpot VMが実装される前)には、パフォーマンスに関する批判がいくつかありました。ベンチマークでは、JavaはC(ネイティブコードにコンパイルされる言語)よりも約50%遅いと報告されることが一般的でした。[ 108 ] [ 109 ] [ 110 ]
Javaのパフォーマンスは初期バージョンから大幅に向上しました。[ 23 ]いくつかの最適化されたテストでは、 JITコンパイラのパフォーマンスはネイティブコンパイラと比較して非常に似ていることが示されています。[ 23 ] [ 24 ] [ 25 ]
Javaバイトコードは、仮想マシンによって実行時に解釈されるか、ロード時または実行時にコンパイルされてコンピュータのハードウェア上で直接実行されるネイティブコードに変換されます。解釈はネイティブ実行よりも遅く、ロード時または実行時のコンパイルにはコンパイルによる初期パフォーマンスの低下があります。最新の高性能JVM実装はすべてコンパイル方式を採用しているため、初期起動時間を過ぎるとパフォーマンスはネイティブコードと同等になります。
Javaプラットフォームは、悪意のあるソフトウェアや不適切に記述されたソフトウェアから保護するために、ユーザーが信頼できないバイトコードを「サンドボックス」内で実行できるように設計されたセキュリティアーキテクチャ[ 111 ]を提供します。この「サンドボックス」機能は、ローカルファイルシステムへのアクセス、任意のコマンドの実行、通信ネットワークへのアクセスなど、マルウェアによって悪用される可能性のある特定のプラットフォーム機能やAPIへのアクセスを制限することによって、ユーザーを保護することを目的としています。
近年、研究者たちは、OracleのJava実装を含む、広く利用されているJava実装の一部に多数のセキュリティ上の欠陥を発見しました。これらの欠陥により、信頼できないコードがサンドボックス機構を回避し、ユーザーが悪意のある攻撃にさらされる可能性があります。これらの欠陥は、公開WebサイトからダウンロードしたJavaアプレットを実行するWebブラウザプラグインなど、任意の信頼できないバイトコードを実行するJavaアプリケーションのみに影響します。ユーザーが実行されるすべてのコードを信頼し、完全に制御できるアプリケーションは影響を受けません。
2012年8月31日、Microsoft Windows、 OS X、Linux上のJava 6と7(当時両方ともサポートされていた)に、悪意のあるWebページを読み込むだけでリモート攻撃が可能になる深刻なセキュリティ上の欠陥が発見された。 [ 112 ]その後、 Java 5にも同様の欠陥があることが判明した。[ 113 ]
2013 年 1 月 10 日、3 人のコンピュータ専門家が Java に反対し、ロイター通信に対し、Java は安全ではないため、Java を無効にするべきだと述べた。AlienVault Labs のラボ マネージャーである Jaime Blasco 氏は、「Java はひどい。安全ではない。無効にしなければならない」と述べた。[ 114 ] この脆弱性はJava 7に影響し、 Java 6に影響するかどうかは不明であるため、消費者は Java を無効にすることを推奨する。[ 115 ] [ 116 ] Oracle のセキュリティ アラートでは、Java の重要なセキュリティ関連のパッチのスケジュールが発表されている。[ 117 ]
On January 14, 2013, security experts said that the update still failed to protect PCs from attack.[118] This exploit hole prompted a response from the United States Department of Homeland Security encouraging users to disable or uninstall Java.[14] Apple blacklisted Java in limited order for all computers running its OS X operating system through a virus protection program.[119]
In 2014 and responding to then-recent Java security and vulnerability issues, security blogger Brian Krebs has called for users to remove at least the Java browser plugin and also the entire software. "I look forward to a world without the Java plugin (and to not having to remind readers about quarterly patch updates) but it will probably be years before various versions of this plugin are mostly removed from end-user systems worldwide."[120] "Once promising, it has outlived its usefulness in the browser, and has become a nightmare that delights cyber-criminals at the expense of computer users."[121] "I think everyone should uninstall Java from all their PCs and Macs, and then think carefully about whether they need to add it back. If you are a typical home user, you can probably do without it. If you are a business user, you may not have a choice."[122]
The Oracle-distributed Java runtime environment has a history of bundling sponsored software to be installed by default during installation and during the updates which roll out every month or so. This includes the "Ask.com toolbar" that will redirect browser searches to ads and "McAfee Security Scan Plus".[123] These offers can be blocked through a setting in the Java Control Panel, although this is not obvious. This setting is located under the "Advanced" tab in the Java Control Panel, under the "Miscellaneous" heading, where the option is labelled as an option to suppress "sponsor offers".
Java has yet to release an automatic updater that does not require user intervention and administrative rights[124] unlike Google Chrome[125] and Flash player.[126]
{{cite web}}: CS1 maint: archived copy as title (link){{cite web}}: CS1 maint: archived copy as title (link)'The lawyers had told us that we couldn't use the name "OAK" because [it was already trademarked by] Oak Technologies,' said Frank Yellin, a senior engineer at Sun. 'So a brainstorming session was held to come up with ideas for a new name.'
'It's priced below our cost,' Schmidt says. 'This loses money in the licensing business for the foreseeable future. It's a strategic investment in market share.'
Only X.org Mode supported. Wayland mode is unsupported.
Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.