Code example for JarEntry

Methods: getName

     * @return The resulting file 
     * @throws IOException If exception occurs during extraction process 
    private Path extractFile(JarFile jarFile, JarEntry jarEntry,
            Path destinationDir) throws IOException {
        Path destinationFile = destinationDir.resolve(jarEntry.getName());
        if (Files.isDirectory(destinationFile)) {
            return null; 
        Files.copy(jarFile.getInputStream(jarEntry), destinationFile);
        return destinationFile;
Stop searching for code, let great code find you!  Add Codota to your java IDE