forked from mirrors/nixpkgs
docs: explain the home passthru present in all JDKs and setting JAVA_HOME where required
This commit is contained in:
parent
43905b1e0c
commit
e84e2fb434
|
@ -61,7 +61,18 @@ installPhase =
|
||||||
<literal>${jre}/bin/java</literal> instead of
|
<literal>${jre}/bin/java</literal> instead of
|
||||||
<literal>${jdk}/bin/java</literal>, you prevent your package from depending
|
<literal>${jdk}/bin/java</literal>, you prevent your package from depending
|
||||||
on the JDK at runtime.
|
on the JDK at runtime.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Note all JDKs passthru <literal>home</literal>, so if your application
|
||||||
|
requires environment variables like <envar>JAVA_HOME</envar> being set, that
|
||||||
|
can be done in a generic fashion with the <literal>--set</literal> argument
|
||||||
|
of <literal>makeWrapper</literal>:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
--set JAVA_HOME ${jdk.home}
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is possible to use a different Java compiler than <command>javac</command>
|
It is possible to use a different Java compiler than <command>javac</command>
|
||||||
|
|
Loading…
Reference in a new issue