title: How do I create Java built-in object from string
body: <p>Suppose I want to create a Java object from string.</p>
  
  <pre><code>Object obj = Class.forName("com.my.object.MyObject").newInstance();
  </code></pre>
  
  <p>I was able to create MyObject. My question is how can I create a Java built-in object such as Long or String from string. I need to do this because I can only know the type of object in run time in text format. </p>
  
  <p>I did this but didn't work. </p>
  
  <pre><code>Object obj = Class.forName("java.lang.Long").newInstance();
  </code></pre>