title: Custom implementation of Thread in Java: Is it possible though JNI?
body: <p>Would it be possible to implement a custom Thread class in Java (using JNI) in a safe / correct way?</p>
  
  <p>Suppose I write my own <code>NewThread</code> class, with a native <code>start()</code> method, which forks the execution, calls <code>run()</code> in the forked thread and returns...</p>
  
  <p>Is that possible? Would the JVM complain? Is it "legal" according to the specs? Would this break anything, like, in the memory-model? Does it depend on the particular JVM?</p>