Java: Difference between revisions

imported>Nh2
m mention javaws
imported>P-h
No edit summary
Line 9: Line 9:
== JDK options ==
== JDK options ==


Your default choice should probably be to install <code>jdk11</code>, which is an alias for <code>openjdk11</code>. If you're in a server environment, go for <code>jdk11_headless</code>. Java 11 is the currently-maintained LTS version of OpenJDK as of Oct 2019.
Your default choice should probably be to install <code>jdk11</code>, which is an alias for <code>openjdk11</code>. If you're in a server environment, go for <code>jdk11_headless</code>. Java 11 is the currently-maintained LTS version of OpenJDK as of March 2021.


As you might expect, though, many flavors of Java are available in NixOS.
As you might expect, though, many flavors of Java are available in NixOS.
Line 16: Line 16:
** <code>openjdk8[_headless]</code> for a legacy Java 8 VM required by some older apps
** <code>openjdk8[_headless]</code> for a legacy Java 8 VM required by some older apps
** <code>openjdk11[_headless]</code>, the currently-supported LTS version of OpenJDK
** <code>openjdk11[_headless]</code>, the currently-supported LTS version of OpenJDK
** <code>openjdk12[_headless]</code>, the current version of OpenJDK
** <code>openjdk14[_headless]</code>, the current version of OpenJDK
* AdoptOpenJDK, prebuilt binaries for OpenJDK
* AdoptOpenJDK, prebuilt binaries for OpenJDK
** <code>adoptopenjdk-bin</code> points to the latest version of AdoptOpenJDK, which is version 11 at the time of writing.
** <code>adoptopenjdk-bin</code> points to the latest version of AdoptOpenJDK, which is version 11 at the time of writing.
** <code>adoptopenjdk-jre-bin</code> is available if you want to avoid downloading the compiler and only require the runtime environment.
** <code>adoptopenjdk-jre-bin</code> is available if you want to avoid downloading the compiler and only require the runtime environment.
** <code>adoptopenjdk{,-jre}-openj9-bin-{8,11,13}</code> same, but using [https://en.wikipedia.org/wiki/OpenJ9 Eclipse OpenJ9] instead of HotSpot as its JVM.
* JetBrains JDK (<code>jetbrains.jdk</code>), a fork of OpenJDK with modifications made by JetBrains
* JetBrains JDK (<code>jetbrains.jdk</code>), a fork of OpenJDK with modifications made by JetBrains
* Oracle's JDK (<code>oraclejdk</code>), only version 8 is available.
* Oracle's JDK (<code>oraclejdk</code>), only version 8 is available.