Created
August 28, 2012 05:13
-
-
Save wendal/3495135 to your computer and use it in GitHub Desktop.
获取Classpath中所有jar的路径
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws Throwable { | |
Enumeration<URL> urls = SimpleDaoTest.class.getClassLoader().getResources("META-INF/MANIFEST.MF"); | |
while (urls.hasMoreElements()) { | |
URL url = (URL) urls.nextElement(); | |
System.out.println(url); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment