title: launch4j exe can't find jre
body: <p>Issues with launch4j</p>
  
  <p>Program consists on one uber jar via maven-shade plugin and a Data/
  Runs fine on any jre7 machine, windows or linux</p>
  
  <p>However I've been unable to get launch4j to work.</p>
  
  <p>launch4j config.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;launch4jConfig&gt;
    &lt;dontWrapJar&gt;false&lt;/dontWrapJar&gt;
    &lt;headerType&gt;gui&lt;/headerType&gt;
    &lt;jar&gt;pllsolver-0.2alpha.jar&lt;/jar&gt;
    &lt;outfile&gt;pllsolver-0.2alpha.exe&lt;/outfile&gt;
    &lt;errTitle&gt;NO JRE FOUND&lt;/errTitle&gt;
    &lt;cmdLine&gt;&lt;/cmdLine&gt;
    &lt;chdir&gt;&lt;/chdir&gt;
    &lt;priority&gt;normal&lt;/priority&gt;
    &lt;downloadUrl&gt;http://java.com/download&lt;/downloadUrl&gt;
    &lt;supportUrl&gt;&lt;/supportUrl&gt;
    &lt;stayAlive&gt;false&lt;/stayAlive&gt;
    &lt;manifest&gt;&lt;/manifest&gt;
    &lt;icon&gt;sicr.ico&lt;/icon&gt;
    &lt;jre&gt;
      &lt;path&gt;jre7&lt;/path&gt;
      &lt;bundledJre64Bit&gt;false&lt;/bundledJre64Bit&gt;
      &lt;minVersion&gt;&lt;/minVersion&gt;
      &lt;maxVersion&gt;&lt;/maxVersion&gt;
      &lt;jdkPreference&gt;preferJre&lt;/jdkPreference&gt;
      &lt;runtimeBits&gt;64/32&lt;/runtimeBits&gt;
    &lt;/jre&gt;
    &lt;splash&gt;
      &lt;file&gt;sicr.bmp&lt;/file&gt;
      &lt;waitForWindow&gt;false&lt;/waitForWindow&gt;
      &lt;timeout&gt;5&lt;/timeout&gt;
      &lt;timeoutErr&gt;true&lt;/timeoutErr&gt;
    &lt;/splash&gt;
    &lt;messages&gt;
    &lt;/messages&gt;
  &lt;/launch4jConfig&gt;
  </code></pre>
  
  <p>Then to build, on windows, I try this:</p>
  
  <pre><code>PS K:\test&gt; set PATH="K:\test\jre7\bin\"
  PS K:\test&gt; ..\launch4j\launch4jc.exe .\config.xml
  launch4j: Compiling resources
  launch4j: Linking
  launch4j: Wrapping
  launch4j: Successfully created K:\test\.\pllsolver-0.2alpha.exe
  PS K:\test&gt; .\pllsolver-0.2alpha.exe
  PS K:\test&gt;
  </code></pre>
  
  <p>It's at this point that I get a nice little window about how it failed to find the JRE.</p>
  
  <p>Java is in
  K:\test\jre7\bin\java.exe
  My jar is
  K:\test\pllsolver-0.2alpha.jar</p>
  
  <p>Additionally, I don't know if this will be an issue yet, but the executable and the Data/ need to be in the same directory.  I'm planning to do better pathing later but I don't have a clear understanding of Windows ENV variables.</p>