Java: Difference between revisions

Minor formatting/wording tweaks
jdk11: alternatives to overriding cacert for jdk11+
 
(2 intermediate revisions by 2 users not shown)
Line 151: Line 151:
=== jdk11 ===
=== jdk11 ===


JDK11 does not provide the cacert overridable and therefore it is not possible to use the same technique to override the truststore.
JDK11 does not provide the cacert overridable and therefore it is not possible to use the same technique to override the truststore.
 
As an alternative solution you can either set an environment variable, <code>JAVAX_NET_SSL_TRUSTSTORE</code>, or pass an argument to your program, <code>-Djavax.net.ssl.trustStore</code>, with the location of your cacert. See [https://discourse.nixos.org/t/custom-ssl-certificates-for-jdk/18297/9 discussion].


== Building and Packaging ==
== Building and Packaging ==
Line 185: Line 187:
To fetch ivy sources in a fixed-output-derivation, see for example [https://github.com/milahu/nur-packages/blob/master/pkgs/yacy/yacy.nix yacy.nix]
To fetch ivy sources in a fixed-output-derivation, see for example [https://github.com/milahu/nur-packages/blob/master/pkgs/yacy/yacy.nix yacy.nix]


== JavaFX and Webkit support ==
To include support for JavaFX and Webkit, use the <code>enableJavaFX</code> and <code>withWebKit</code> options:
<syntaxHighlight lang=nix>
{ pkgs, ... }:
let
  jdkWithFX = pkgs.openjdk.override {
    enableJavaFX = true; # for JavaFX
    # include following line if JavaFX with Webkit is needed
    openjfx_jdk = pkgs.openjfx.override { withWebKit = true; };
  };
in
...
</syntaxHighlight>
== Further reading ==
== Further reading ==
{{Nixpkgs manual|sec-language-java}}<br /><br /><br /><br /><br />{{Wikipedia|Java_(programming_language)}}
{{Nixpkgs manual|sec-language-java}}<br /><br /><br /><br /><br />{{Wikipedia|Java_(programming_language)}}


[[Category:Applications]]
[[Category:Languages]]
[[Category:Languages]]