title: Java: how to detect the current java runtime is a JRE or JDK?
body: <p>I got a Java application, I want to provide user ability to compile Java source code (Using JavaCompiler interface)</p>
  
  <p>If the user run the application on a JRE, my application should tell user that the no JavaCompiler instance  aviable.</p>
  
  <p>so how  to detect JDK or JRE in java programe?</p>