Here you can find the source of resolveURL(URL url)
Parameter | Description |
---|---|
url | a parameter |
public static URL resolveURL(URL url)
//package com.java2s; /*************************************************************************************************** * Copyright (c) 2005 Eteration A.S. and Gorkem Ercan. All rights reserved. This program and the * accompanying materials are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * //from w w w .j a v a2 s. co m * Contributors: Gorkem Ercan - initial API and implementation * **************************************************************************************************/ import java.io.IOException; import java.net.URL; import org.eclipse.core.runtime.FileLocator; public class Main { /** * Returns a resolved equivalent of url, use with the * platform relative urls * * @param url * @return URL */ public static URL resolveURL(URL url) { try { return FileLocator.resolve(url); } catch (IOException e) { //ignore } return null; } }