ProcessBuilder unable to find Kotlin in path
<p>When I run:</p>

<pre><code>new ProcessBuilder("kotlinc", "-help").start();
</code></pre>

<p>I get the error: <strong>Cannot run program "kotlinc": CreateProcess error=2, The system cannot find the file specified</strong></p>

<p>I've tried:</p>

<ul>
<li><p>If I check my path from windows, it contains <code>C:\Apps\kotlinc\bin</code>, and when I open explorer at that location, there's a file named <code>kotlinc</code>.</p></li>
<li><p>If I open <code>cmd.exe</code> anywhere, and run <code>kotlinc</code>, it works just fine.  </p></li>
<li><p>If I print out my environment:</p>

<p><code>System.out.print(new ProcessBuilder("kotlinc", "-help").environment().get("Path"));</code></p>

<p>it contains <code>C:\Apps\kotlinc\bin</code></p></li>
<li><p>If I run <code>new ProcessBuilder("python3", "file.py").start()</code>, it works just fine.</p></li>
<li>Rebooting my machine</li>
</ul>

<p>Changing <code>kotlinc</code> to use the full file path is <em>not</em> an acceptable solution, as this is being run across multiple computers and platforms.</p>

<p>As far as I can tell, everything is setup correctly.  </p>

<p><strong>Why can't I run <code>kotlinc</code> from <code>ProcessBuilder</code>?</strong></p>