title: Exporting a runnable jar with environment variables specified in Eclipse
body: <p>I am currently using <a href="http://www.sikuli.org/" rel="nofollow noreferrer">Sikuli</a> which requies both a <code>PATH</code> and <code>SIKULI_PATH</code> environment variable to be set in order to execute. Applying this in the run config is fairly straight forward and allows me to run the script as intended from within Eclipse.</p>
  
  <p>Exporting the runnable JAR is working well with everything except <code>UnsatisfiedLinkError</code> is being thrown which was the same exception I would receive when I didn't have the aforementioned variables set.</p>
  
  <p>Is there a convenient way to export the below settings into the runnable JAR?: 
  <img src="https://i.stack.imgur.com/W8Np3.png" alt="enter image description here"></p>
  
  <p>The idea is to essentially generate a stand-alone executable JAR that executes the Sikuli script.</p>
  
  <p>I have attempted to manually set <code>PATH</code>and <code>SIKULI_HOME</code> which worked as intended (<code>echo %PATH%</code> &amp; <code>echo %SIKULI_HOME%</code> both print the required paths). However I'm still receiving the same <code>UnsatisfiedLinkError</code>. Below is the relevant StackTrace:</p>
  
  <pre><code>C:\Users\XXXXX\Desktop&gt;java -jar sikuli.jar -Dsikuli.Debug=3 -Djava.library.path = "C:\Program Files (x86)\Sikuli X\"
  Exception in thread "main" java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at     org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
  Caused by: java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Sikuli X\libs\Win32Util.dll: Can't find dependent libraries
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(Unknown Source)
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.load0(Unknown Source)
      at java.lang.System.load(Unknown Source)
      at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
      at org.sikuli.script.Win32Util.&lt;clinit&gt;(Win32Util.java:19)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at org.sikuli.script.Env.getOSUtil(Env.java:91)
      at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:180)
      at org.sikuli.script.ScreenHighlighter.&lt;init&gt;(ScreenHighlighter.java:293)
      at org.sikuli.script.Screen.initBounds(Screen.java:105)
      at org.sikuli.script.Screen.&lt;init&gt;(Screen.java:117)
      at org.sikuli.tests.TestSikuli.main(TestSikuli.java:13)
  </code></pre>