Here you can find the source of containsClass(JarFile jarFile, String classFilePath)
static boolean containsClass(JarFile jarFile, String classFilePath)
//package com.java2s; import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile; public class Main { static boolean containsClass(JarFile jarFile, String classFilePath) { final Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { final JarEntry entry = entries.nextElement(); if ((!entry.isDirectory()) && entry.getName().contains(classFilePath)) { return true; }// ww w.jav a 2 s .c o m } return false; } }