001package edu.pdx.cs410J.net;
002
003import java.net.*;
004
005/**
006 * Uses a <code>URLClassLoader</code> to load a resource from a given
007 * URL. 
008 */
009public class LoadFromURL {
010
011  public static void main(String[] args) throws Exception {
012    String url = args[0];
013    String resource = args[1];
014
015    URL[] urls = { new URL(url) };
016    URLClassLoader loader = new URLClassLoader(urls);
017
018    URL r = loader.getResource(resource);
019    System.out.println(r);
020  }
021}