public static void listDBs() throws Exception
	 {
		 
		 Class.forName(JDBC_DRIVER);
		 Connection  conn = DriverManager.getConnection(DB_URL, USER_NAME, PASSWORD);
		
		 // see if a connection is established 
		 if(conn != null)
		 {
			 System.out.println("Connection established");
		 }
		 
		 // list all the databases in it:
		 DatabaseMetaData meta = conn.getMetaData();
	     ResultSet res = meta.getCatalogs();
	     System.out.println("List of databases: "); 
	     while (res.next()) 
	     {
	    	 System.out.println("   "+res.getString("TABLE_CAT"));
	     }	      
	     // close response
	      res.close();
	     // close connection
	     conn.close();
		 
	 }