title: Websphere administration tool
body: <p>I'm trying to create an administrative client program for websphere,
  but when I'm trying to connect I get the following message.</p>
  
  <p>Maybe I lack some libs (I create my app in notepad).</p>
  
  <pre><code>at TryConnection1.main(TryConnection1.java:37) Caused by: java.lang.ClassNotFoundException: com.ibm.websphere.security.auth.WSL oginFailedException
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 1 more
  </code></pre>
  
  <p>My code: </p>
  
  <pre><code>import java.util.Properties;
  import javax.management.MalformedObjectNameException; 
  import javax.management.ObjectName; 
  
  import javax.management.*;
  import com.ibm.websphere.management.*; 
  import com.ibm.websphere.management.AdminClient; 
  import com.ibm.websphere.management.AdminClientFactory; 
  import com.ibm.websphere.management.exception.*;
  
  import com.ibm.websphere.management.exception.ConnectorException;
  
  public class TryConnection1 {
  
      /**  * @param args  */
  
      public static void main(String[] args) {
  
      Properties connectProps = new Properties(); 
      connectProps.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
  
      connectProps.setProperty(AdminClient.CONNECTOR_HOST, "hostgoeshere");
      connectProps.setProperty(AdminClient.CONNECTOR_PORT, "portgoeshere");
      connectProps.setProperty(AdminClient.USERNAME, "usernamegoeshere");
      connectProps.setProperty(AdminClient.PASSWORD, "passgoeshere");
  
      AdminClient adminClient = null; 
      try {
          adminClient = AdminClientFactory.createAdminClient(connectProps); 
      } catch(ConnectorException e) {
          System.out.println("Exception creating admin client: " + e); }
      }
  }
  </code></pre>