On NixOS
, I am trying to install java
in order to compile my code from the command line.
I do not see the java compiler listed anywhere in the list of available packages, queried by running nix-env -qaP '*' --description
.
How do I install a java compiler on NixOS
?
Best Answer
There are two Java compilers available via Nixpkgs: OpenJDK and OracleJDK, named
openjdk
andoraclejdk
, respectively.Note that the OracleJDK doesn't seem to be available in the top-level expression, but you can certainly install the
openjdk
.