public static void build(File destination, String replacement, byte replacementData[])
throws IOException
{
FileUtils.copyFile(JAR_FILE, destination);
java.nio.file.Path destinationPath = destination.toPath();
ByteArrayInputStream in = new ByteArrayInputStream(replacementData);
FileSystem fileSystem = FileSystems.newFileSystem
// FileSystem fileSystem = FileSystems.newFileSystem(destinationPath, (ClassLoader)null);
java.nio.file.Path replacementPath = fileSystem.getPath(replacement, new String[0]);
Files.copy(in, replacementPath, new CopyOption[] {
StandardCopyOption.REPLACE_EXISTING
});
fileSystem.close();
in.close();
}
Aqui o que ele pede de atributos
E aqui o que tem de opcoes i.ibb.co/Gd3LVFs/3.png
Esta linha nao mostra erro, compila mais nao funciona
FileSystem fileSystem = FileSystems.newFileSystem(destinationPath, (ClassLoader)null);
Esta linha nao mostra erro, compila mais nao funciona
FileSystem fileSystem = FileSystems.newFileSystem(destinationPath, null, null);
Esta linha nao compila e mostra o seguinte erro
reference to newFileSystem is ambiguous both method newFileSystem(Path,ClassLoader) in FileSystems and method newFileSystem(Path,Map<String,?>)in FileSystems match
FileSystem fileSystem = FileSystems.newFileSystem(destinationPath, null);