PrintClasspath.java :  » XML » jspf » net » xeoh » plugins » sandbox » Java Open Source

Java Open Source » XML » jspf 
jspf » net » xeoh » plugins » sandbox » PrintClasspath.java
package net.xeoh.plugins.sandbox;

import java.net.URL;
import java.net.URLClassLoader;

public class PrintClasspath {
    public static void main(String[] args) {

        // Get the System Classloader
        ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

        // Get the URLs
        URL[] urls = ((URLClassLoader) sysClassLoader.getParent()).getURLs();

        for (int i = 0; i < urls.length; i++) {
            System.out.println(urls[i].getFile());
        }

    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.