/** * Analyze this jar file for containing jar files and classes to be used in our own * classloader. * * @param file * the file to analyze * @throws IOException * if something happens on file access. */ private void addJarResource(File file) throws IOException { JarFile jarFile = new JarFile(file); addURL(file.toURI().toURL()); analyzeFile(file); Enumeration<JarEntry> jarEntries = jarFile.entries(); while (jarEntries.hasMoreElements()) { JarEntry jarEntry = jarEntries.nextElement(); if (!jarEntry.isDirectory() && isJar(jarEntry.getName())) { File jar = jarEntryAsFile(jarFile, jarEntry); if (jar.getName().contains("io.opentracing")) { bootClassLoaderJarFiles.add(jar.getAbsolutePath()); } else { addJarResource(jar); } } } }