title: Do Java's threads work like process on linux?
body: <p>I've started a jetty server and an ehcache instance, soon I encountered the thread limit on linux when I start another jave process. </p>
  
  <p>The error message was <code>unable to create new native thread</code> (P.S. My linux OS is CentOS 6.2).</p>
  
  <p>Then I used <code>ps -xH</code> to know that the two java processes(jetty and ehcache) spawn almost 800 threads, and the total number of <code>ps -xH</code> are 1023, <code>ulimit -u</code> shows 1024.</p>
  
  <p>So, my question is that why the java spawn threads but I've encountered the limit of process numbers?</p>
  
  <p>P.S. I have enough memory</p>