<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged jdk</title>
<link>https://ask.clojure.org/index.php/tag/jdk</link>
<description></description>
<item>
<title>Ability to customise java-cmd in tools.build</title>
<link>https://ask.clojure.org/index.php/12134/ability-to-customise-java-cmd-in-tools-build</link>
<description>&lt;p&gt;Moving the original &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C02B5GHQWP4/p1661625386101119&quot;&gt;question&lt;/a&gt; from Clojurians Slack:&lt;/p&gt;
&lt;p&gt;When moving one of my projects to JDK 19 I was pointing clojure to the jdk using the &lt;strong&gt;JAVA_CMD&lt;/strong&gt; env var. Everything was fine til I hit the uber jar step in the CI, where it simply refused to recognise the jdk 19 functions.&lt;/p&gt;
&lt;p&gt;Took me a while and including reading the tools.build source to realise why it wasn't propagating the &lt;strong&gt;JAVA_CMD&lt;/strong&gt; var and turns out I had to read env and send the &lt;strong&gt;:java_cmd&lt;/strong&gt; in the &lt;strong&gt;b/compile-clj&lt;/strong&gt; call.&lt;/p&gt;
&lt;p&gt;I can see why the behaviour is like this, but would &lt;strong&gt;:java_cmd&lt;/strong&gt; defaulting to the value of &lt;strong&gt;JAVA_CMD&lt;/strong&gt; something that could be considered? Feels a bit more intuitive for me, as mostly the invocations of tools.build fns would be from the shell.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12134/ability-to-customise-java-cmd-in-tools-build</guid>
<pubDate>Sat, 27 Aug 2022 20:54:32 +0000</pubDate>
</item>
</channel>
</rss>