public static URL convertToURL(String path) {
		if(path==null || path.isEmpty()){
			return null;
		}
		URL url = null;
		try {
			url = new URL(path);
		} catch (MalformedURLException e) {
			url = Thread.currentThread().getContextClassLoader().getResource(
					path);
			if (url == null) {
				File file = new File(path);
				if (file.exists()) {
					try {
						url = file.toURI().toURL();
					} catch (MalformedURLException e1) {
						Logger.getLogger(Util.class.getName())
								.log(Level.SEVERE, path + " is Not valid", e);
					}
				}
			}
		}
		return url;
	}