有很多的jar包,现在我需要找到javax.rmi.PortableRemoteObject类在哪个jar包中,并且将它导入classpath中。有什么相关的工具或者命令么?

解决方案 »

  1.   


    public void searchZip(File file, String fileName) {
    try {
    ZipInputStream zip = new ZipInputStream(new FileInputStream(file));
    ZipEntry ze;
    fileName=fileName.toLowerCase();
    while ((ze = zip.getNextEntry()) != null) {
    String name = ze.getName().toLowerCase();
    searching(file.getAbsolutePath() + "$" + ze.getName());
    if (name.indexOf(fileName) > -1 || getMatch(name, fileName)) {
    System.out.println(file.getAbsolutePath() + "$" + name);
    }
    zip.closeEntry();
    }
    zip.close();
    } catch (IOException e) {
    }
    }
    private boolean getMatch(String str1, String str2) {
    if (str1 == null || str2 == null)
    return false;
    while (str2.indexOf('*') > -1)
    str2 = str2.replace('*', '/');
    str2 = str2.replaceAll("/", ".*");
    return str1.matches(str2);
    }
      

  2.   

    searching(file.getAbsolutePath() + "$" + ze.getName());这句话多了