I'm having an issue with adding a file into a zip with trueVFS. Here's a short code snippet:
package org.example.zipper;
import java.io.File;
import java.io.IOException;
import net.java.truevfs.access.TFile;
import net.java.truevfs.access.TVFS;
public class Zipper {
/**
* @param args[0] path to file to be added to the zip
* @param args[1] path to zip file
* @throws IOException
*/
public static void main(String[] args) throws IOException {
new Zipper().zip(args[0], args[1]);
}
public void zip(String filePath, String zipFilePath) throws IOException {
File source = new File(filePath);
TFile.cp(source, new TFile(zipFilePath + File.separator + source.getName()));
TVFS.umount();
}
}
Results in the following exception (running with Java 11):
Exception in thread "main" java.util.ServiceConfigurationError: No key manager available for class net.java.truecommons.key.spec.common.AesPbeParameters.
at net.java.truecommons.key.spec.AbstractKeyManagerMap.manager(AbstractKeyManagerMap.java:36)
at net.java.truevfs.comp.zipdriver.AbstractKeyController.keyManager(AbstractKeyController.java:153)
at net.java.truevfs.comp.zipdriver.AbstractKeyController.sync(AbstractKeyController.java:149)
at net.java.truevfs.kernel.spec.FsDelegatingController.sync(FsDelegatingController.java:122)
at net.java.truevfs.kernel.impl.FalsePositiveArchiveController.sync(FalsePositiveArchiveController.java:236)
at net.java.truevfs.kernel.spec.FsSync$1SyncVisitor.visit(FsSync.java:66)
at net.java.truevfs.kernel.spec.FsSync$1SyncVisitor.visit(FsSync.java:59)
at net.java.truevfs.kernel.impl.DefaultManager$3.call(DefaultManager.java:129)
at net.java.truevfs.kernel.impl.DefaultManager.accept(DefaultManager.java:141)
at net.java.truevfs.kernel.spec.FsSync.run(FsSync.java:77)
at net.java.truevfs.access.TVFS.sync(TVFS.java:177)
at net.java.truevfs.access.TVFS.umount(TVFS.java:56)
at org.example.zipper.Zipper.zip(Zipper.java:22)
at org.example.zipper.Zipper.main(Zipper.java:16)
Haven't been able to find the cause for this and would be grateful for a hint.