Java tutorial
//package com.java2s; import java.net.MalformedURLException; import java.net.URL; public class Main { public static boolean isUrlValid(final String strUrl) { if (null == strUrl) { return false; } try { new URL(strUrl); return true; } catch (final MalformedURLException e) { return false; } } }