title: Run *.exe file from inside JAR
body: <p>I have a huge JAR file, which I created with <code>Maven Shade</code> plugin.</p>
  
  <p>I run this with <code>java -jar foo.jar</code> , and my UI opens. Now I want to execute <code>*.exe</code> file, which is also in that JAR file, how can I do this?</p>
  
  <p>I tried putting the exe to my classpath and run it from there, but after trying I found out that classpath is actually the location, where my JAR is.</p>
  
  <p><strong>Any suggestions?</strong></p>
  
  <p>Found this thing here, but is this really the best solution? Seems like alot of work, I think I have different case here, because I can define the location of exe myself and the JAR is created by me.</p>
  
  <p><a href="https://stackoverflow.com/questions/600146/run-exe-which-is-packaged-inside-jar">run exe which is packaged inside jar</a></p>
  
  <p>Why I need this?</p>
  
  <p><strong>I want to give user a single file executable, which he can run, but my program is using the *.exe. Should I put the exe next to my jar and there will be 2 files or there is solution for my requirements?</strong></p>