title: How create object of ScriptableObject in java-scripts.....?
body: <p>when I try to make an object of a class in java-script file which extends <strong>ScriptableObject</strong>... The following error will arise.</p>
  
  <pre><code>js: uncaught JavaScript runtime exception: TypeError: Cannot find default value for object.”
  </code></pre>
  
  <p><strong>class file is</strong></p>
  
  <pre><code>package sumit2;
  import org.mozilla.javascript.ScriptableObject;
  public class Sumit extends ScriptableObject {
  public String getClassName(){
      return "Sumit";
  }   
  public void foo() {
      System.out.println("Sumit!!!!!!!");
  }
  }
  </code></pre>
  
  <p><strong>Java-Script File is:-</strong></p>
  
  <pre><code>importPackage(Packages.sumit2);
  var vv=new Sumit();
  print(vv.foo());
  </code></pre>