List of usage examples for java.lang StringBuilder getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.quinsoft.zeidon.standardoe.JavaObjectEngine.java
/** * @param logger/*from w w w.j a v a 2 s .c o m*/ */ private static String getClassPath(ZeidonLogger logger) { try { StringBuilder classpath = new StringBuilder(); ClassLoader classLoader = classpath.getClass().getClassLoader(); if (classLoader == null) classLoader = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader) classLoader).getURLs(); for (URL url : urls) classpath.append(url.getFile()).append("\n"); return classpath.toString(); } catch (Exception e) { if (logger != null) logger.error("Error trying to log classpath", e, (Object[]) null); return "<Error retrieving classpath>"; } }