title: how to run a java program at background from chef recipe
body: <p>I am a chef rookie. I want to create a recipe to run a jar at background.</p>
  
  <pre><code>bash 'run_jar' do
      code &lt;&lt;-EOH
      wget https://github.com/kiwiwin/jar-repo/releases/download/kiwi/helloworld-1.0.jar -O hello.jar
      java -jar hello.jar &amp;
      EOH
  end
  </code></pre>
  
  <p>The helloworld-1.0.jar is a program first print "Hello World", then execute a while(true) loop. </p>
  
  <p>I expect when I login to the chef-client machine. It should indicate there is a jar running using "jps" command. But there is no such jar running. </p>
  
  <p>And I can see the hello.jar is downloaded which indicates the code block has been executed already.</p>
  
  <p>What's wrong with this recipe?</p>