code: @SuppressWarnings("unused")
      private void printServerInfo() {
          Context ctx;
          try{
              ctx = new InitialContext();
              MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
              ObjectName service = new ObjectName("com.bea:Name=RuntimeService," +
                    "Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
              ObjectName domainMBean = (ObjectName) server.getAttribute(service,
                  "DomainConfiguration");
              ObjectName[] servers = (ObjectName[]) server.getAttribute(domainMBean,
                      "Servers");
              for (ObjectName one : servers) {
                  String name = (String)server.getAttribute(one, "Name");
                  String address = (String)server.getAttribute(one, "ListenAddress");
                  Integer port = (Integer)server.getAttribute(one, "ListenPort");
                  System.out.println("SERVER: " + name + " on " + address + ":" + port);
                  ObjectName machine = (ObjectName)server.getAttribute(one, "Machine");
                  ObjectName nodeManager = (ObjectName)server.getAttribute(machine, "NodeManager");
                  // above line need WLS admin!!!
                  address = (String)server.getAttribute(machine, "ListenAddress");
                  System.out.println(" - hostname: " + address);
              }
              if (ctx!=null) return;
          }catch(Exception ex){
              ex.printStackTrace();
          }
      }
docs: tried to access machine but that need WLS admin credential, so have not tried further