title: SSJS to call a method in java class (in java library)
body: <p>I've created a java library (named: invoke) with a java class (Invoke). Its seen when expanding Script libraries under code in the designer navigation pane.</p>
  
  <p>The code is:</p>
  
  <pre><code>package com.kkm.vijay;   
  
  public class Invoke {
  
      public static void main(String[] args) {
  
          Runtime r = Runtime.getRuntime();
          Process p = r.exec("C://some.exe");
  
      }
  }
  </code></pre>
  
  <p>Used the following <strong>ssjs</strong> to an <strong>onclick</strong> event of a <strong>button</strong> shows <strong>Error:500</strong> when previewed in browser.</p>
  
  <pre><code>importPackage(com.kkmsoft.vijay);
  var v=new Invoke();
  v.main();
  </code></pre>
  
  <p>Even i used a function inside the class and changed the last line of ssjs to <strong>v.fn()</strong>. Yet the same problem.</p>