Jump to content

Using Oracle JDK instead of Open JDK: Difference between revisions

From Official NixOS Wiki
imported>Fadenb
Created page with "Almost all Java packages in nixpkgs use Open JDK in form of a '''jre''' dependency. If you use Oracle JDK and also want other applications to use it, you can simply tweak your..."
 
imported>Fadenb
m Syntaxhighlight
Line 2: Line 2:


Example with UMLet with JRE 8:
Example with UMLet with JRE 8:
<pre>
<syntaxhighlight lang="nix">
  {
  {
   allowUnfree = true;
   allowUnfree = true;
Line 11: Line 11:
   ;
   ;
  }
  }
</pre>
</syntaxhighlight>

Revision as of 11:53, 27 August 2017

Almost all Java packages in nixpkgs use Open JDK in form of a jre dependency. If you use Oracle JDK and also want other applications to use it, you can simply tweak your .nixpkgs/config.nix so that your desired application uses Oracles JDK or JRE.

Example with UMLet with JRE 8:

 {
   allowUnfree = true;
   packageOverrides = pkgs: rec {
      umlet = pkgs.umlet.override {
        jre = pkgs.oraclejre8;
      };
   ;
 }