Here you can find the source of makeUrl(String url)
static URL makeUrl(String url)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.net.MalformedURLException; import java.net.URL; public class Main { static URL makeUrl(String url) { try {//from ww w . j a v a 2s . com return new URL(url); } catch (MalformedURLException e) { throw new RuntimeException(e); } } }