Java ClassPath Get getClassPath()

Here you can find the source of getClassPath()

Description

get Class Path

License

Open Source License

Declaration

public static String getClassPath() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static String getClassPath() {
        StringBuffer buf = new StringBuffer();
        ClassLoader cl = ClassLoader.getSystemClassLoader();
        URL[] urls = ((URLClassLoader) cl).getURLs();
        for (URL url : urls) {
            if (buf.length() > 0)
                buf.append(";");
            buf.append(url.getFile());/*from w  w w .j av  a2s  .co m*/
        }
        return buf.toString();

    }
}

Related

  1. getClassFromLibs(String className, List libs, boolean useSystemClassPath)
  2. getClassLoaderClasspath(ClassLoader loader)
  3. getClasspath()
  4. getClasspath()
  5. getClasspath()
  6. getClasspath()
  7. getClasspath()
  8. getClassPath()
  9. getClassPath(Class c)