title: Bundling Java (JRE) into a spring-boot package/jar?
body: <p>Is there a way to bundle a spring-boot application into one executable jar including a JRE?</p>
  
  <p>I think I saw someone doing that (Josh Long?) which resulted in a jar you could start via <code>java -jar foo.jar</code> and even with <code>./foo.jar</code></p>
  
  <p>I googled for this the last hour but couldn't find any documentation on this, anyone there to help me out?</p>
  
  <p>EDIT:</p>
  
  <p>I just found what I saw at the conference. spring-boot 1.3 introduces something called executable jars, which <a href="http://docs.spring.io/spring-boot/docs/1.3.0.M1/reference/html/deployment-install.html" rel="nofollow">wrap the jar with a shell script</a>.
  Enabling this makes it possible to run your jar like <code>./my.jar</code> and tying it to an unix init system.
  However, you still need java installed at your host.</p>
  
  <p>Enabling this feature in gradle is as easy as adding this to your build.gradle</p>
  
  <pre><code>springBoot {
      executable = true
  }
  </code></pre>