java.util.zip.ZipError: invalid CEN header (bad signature)

前端 未结 5 1496
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-11 10:23

I\'m using Java 1.7.0_40 on Red Hat Linux and I have the following code:

Path zipfile = Paths.get(filename);
FileSystem fs = FileSystems.newFileSystem(zipfil         


        
5条回答
  •  佛祖请我去吃肉
    2021-01-11 11:09

    It is problem of configuration for maven compiler in your pom file. Default version java source and target is 1.5, even used JDK has higher version.

    To fix, add maven compiler plugin configuration section with higher java version, example:

    
      org.apache.maven.plugins
      maven-compiler-plugin
      3.6.1
      
        1.6
        1.6
      
    
    

    For more info check these links:

    maven compiler

    bug report

提交回复
热议问题