标签:
/*
* URI:绝对路径
*/
System.out.println("当前类ReadTest.class文件的URI\n" + ReadTest.class.getResource(""));
System.out.println("当前classpath的URI\n" + ReadTest.class.getResource("/"));
System.out.println("当前classpath的URI\n" + ReadTest.class.getClassLoader().getResource(""));
System.out.println("当前classpath的URI\n" + Thread.currentThread().getContextClassLoader().getResource(""));
System.out.println("当前classpath的URI\n" + ClassLoader.getSystemResource(""));
标签:
原文地址:http://www.cnblogs.com/pumushan/p/5630886.html