【异常】MALFORMED 抓狂bug解决

 

 

 问题描述:导入某个项目代码后,在该项目下一直报MALFORMED相关错误,新建java报、export也报,代码提示也报一个ide工具错,等等让你抓狂的工具错误,eclipse或myeclipse一样。

打开Error Log 窗口将会看到下面这个错误详情。

java.lang.IllegalArgumentException: MALFORMED
	at java.util.zip.ZipCoder.toString(Unknown Source)
	at java.util.zip.ZipFile.getZipEntry(Unknown Source)
	at java.util.zip.ZipFile.access$900(Unknown Source)
	at java.util.zip.ZipFile$1.nextElement(Unknown Source)
	at java.util.zip.ZipFile$1.nextElement(Unknown Source)
	at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:84)
	at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:252)
	at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:225)
	at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:290)
	at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2282)
	at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2292)
	at org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1321)
	at org.eclipse.jdt.internal.core.JavaProject.findType(JavaProject.java:1228)
	at org.eclipse.jdt.internal.core.manipulation.JavaElementPropertyTester.test(JavaElementPropertyTester.java:155)
	at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
	at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:91)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:150)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:72)
	at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.evalEnablementExpression(LaunchShortcutExtension.java:287)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getShortcutsForSelection(LaunchingResourceManager.java:452)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.computeLabels(LaunchingResourceManager.java:237)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager$2.run(LaunchingResourceManager.java:138)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 

 

 原因分析:

查阅https://bugs.eclipse.org/bugs/show_bug.cgi?id=356724此处后终于解决 

原因是eclipse用了jdk7启动,而jdk7里的zip改用了7zip方法,导致ide的相关工具不兼容。

修改方法:

打开eclipse.ini,修改下面这句,没有-vm就自行加上,记得要换行。

 

-vm
C:/ProgramFiles_x86/Java/jdk1.6.0_16/bin/javaw.exe

 

 

祝能解决你的问题!~

 

 

你可能感兴趣的:(form)