title: Failed to access Java code from XUL/JavaScript
body: <p>This is my java file :</p>
  
  <pre><code>import java.io.File;
  import java.lang.String; 
  public class ListFiles { 
  public static void main(String[] args) {
  
    // Directory path here
    String path = "D:/xmlfiles/";
  
    String files;
    File folder = new File(path);
    File[] listOfFiles = folder.listFiles(); 
  
    for (int i = 0; i &lt; listOfFiles.length; i++) {
      if (listOfFiles[i].isFile()) {
        files = listOfFiles[i].getName();
        System.out.println(files);
  
        }
      }
    }
  }
  </code></pre>
  
  <p>This is my JS file :</p>
  
  <pre>
  function display(){
  
  el = document.getElementById("text");
  el.addEventListener("oncommand", display, true);
  //loading Encryption Class
  
  //alert('hffffi');
  
  var myClass = cl.loadClass('ListFiles'); // use the same loader from above
  
  var myObj = myClass.newInstance();
  
  
  // Pass whatever arguments you need (they'll be auto-converted to Java form, taking into account the LiveConnect conversion rules)
  var Files = myObj.String; 
  
  
  alert('karthik it works'+Files);
  
  document.getElementById("text").value=Files; 
  }
  
  </pre>
  
  <p>Explanation : 
  I'm trying to get the ouptput string of java into my JS. I'm able to connect JAVA with JS using Live connect in XUL Firefox. 
  The problem right now, how can display the output of java in my JS file.</p>
  
  <p>Thanks guys.</p>