about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorArnout Engelen <arnout@bzzt.net>2021-09-30 10:34:51 +0200
committerArnout Engelen <arnout@bzzt.net>2021-09-30 10:34:51 +0200
commit4236dfe203c24c1cee4b6705fed9c36e90115e8b (patch)
tree67b5027313aa912066e1c781803eca2c7e6fef59 /doc
parent31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497 (diff)
downloadnixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.tar
nixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.tar.gz
nixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.tar.bz2
nixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.tar.lz
nixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.tar.xz
nixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.tar.zst
nixlib-4236dfe203c24c1cee4b6705fed9c36e90115e8b.zip
jre_minimal: document how to use a headless JDK
For a smaller image
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/java.section.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/languages-frameworks/java.section.md b/doc/languages-frameworks/java.section.md
index 77919d43f748..371bdf6323fb 100644
--- a/doc/languages-frameworks/java.section.md
+++ b/doc/languages-frameworks/java.section.md
@@ -72,6 +72,15 @@ in
   ...
 ```
 
+You can also specify what JDK your JRE should be based on, for example
+selecting a 'headless' build to avoid including a link to GTK+:
+
+```nix
+my_jre = pkgs.jre_minimal.override {
+  jdk = jdk11_headless;
+};
+```
+
 Note all JDKs passthru `home`, so if your application requires
 environment variables like `JAVA_HOME` being set, that can be done in a
 generic fashion with the `--set` argument of `makeWrapper`: