Here you can find the source of getResourceUrl(final String resourcePath)
Parameter | Description |
---|---|
resourcePath | the path of the local resource. |
public static URL getResourceUrl(final String resourcePath)
//package com.java2s; //License from project: Open Source License import java.net.URL; public class Main { /**//from ww w . j av a 2 s . c om * Gets the {@link URL} of a local resource. * * @param resourcePath the path of the local resource. * @return the {@link URL} of the local resource. */ public static URL getResourceUrl(final String resourcePath) { return ClassLoader.class.getResource(resourcePath); } }