前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux jar错误解决方法

Linux jar错误解决方法

作者头像
三产
发布2021-01-13 11:15:52
1K0
发布2021-01-13 11:15:52
举报
文章被收录于专栏:用户6590312的专栏

Java程序在windows下正常,在Linux下却报jar错 cannot read zip file entry 或者 添加jar包后,项目启动时报错:

java.util.zip.ZipException: invalid END header (bad central directory offset)

at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:127) at java.util.jar.JarFile.<init>(JarFile.java:136) at java.util.jar.JarFile.<init>(JarFile.java:73) at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:70) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71) at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41) at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34) at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:487) at org.apache.catalina.startup.TldConfig.access$100(TldConfig.java:58) at org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:303) at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241) at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:204) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:277) at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:567) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662)

解决方法:

在Linux环境下使用wget获取相应jar(而不是从windows中传输)

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2014/08/25 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档