title: Get list of all applications deployed on a weblogic server
body: <p>Using the following code, I am able to connect to the weblogic server.
  Now I want to get a list of all the applications deployed on the server.</p>
  
  <p>listapplications() from the command prompt lists the applications, but I am not able to store the output into a variable when I execute interpreter.exec(listapplications()) because interpreter.exec returns a void. Any ideas on how can I store the applications list in a collection/array?</p>
  
  <p>Any other alternative or leads would also help.</p>
  
  <pre><code>import org.python.util.InteractiveInterpreter;
  import weblogic.management.scripting.utils.WLSTInterpreter;
  
  public class SampleWLST {
  
      public static void main(String[] args) {
          SampleWLST wlstObject = new SampleWLST();
          wlstObject.connect();
      }
  
      public void connect() {
          InteractiveInterpreter interpreter = new WLSTInterpreter();
          interpreter.exec("connect('username', 'password', 't3://localhost:8001')");
      }
  }
  </code></pre>