You can get all classpath roots by passing an empty String into ClassLoader#getResources() . Enumeration<URL> roots = classLoader. getResources(“”);
Read moreHow do you find the class path?
package com.javacodegeeks.snippets.core;
Read moreHow do I get packages from class?
The package for a class can be obtained using the java. lang. Class. getPackage() method with the help of the class loader of the class .
Read more