打开zip文件或JAR清单时缺少错误:C:/ Program [英] Error opening zip file or JAR manifest missing : C:/Program
问题描述
Microsoft Windows [版本6.1.7601]
版权所有(c)2009 Microsoft Corporation。版权所有。
C:\Users\ubiquibacon> set
GRAILS_HOME = C:\程序文件\GGTS\grails-2.0.4
JAVA_HOME = C:\程序文件\Java\jdk1.7.0_25
路径= C:\程序文件\Java\jdk1.7.0_25\bin; C:\程序文件\GGTS\\ \\grails-2.0.4\bin
C:\Users\ubiquibacon> grails
打开zip文件或JAR清单丢失时出错:C:/ Program
发生错误在VM
代理程序库初始化期间无法初始化:instrument
C:\ Users \ubiquibacon>
我有两个与我一起工作的主要Grails项目。项目A在生产中使用Netbeans使用Grails 2.0.4开发,项目B仍然是原型,并且使用Grails 2.2.4使用 GGTS 。我有一个 .bat
脚本,我可以快速更改我的 GRAILS_HOME
和 PATH
在两个Grails版本之间切换时的变量。这个工作很好,直到我决定在GGTS中打开项目A。我最近还将Java从1.6.0_18 x86升级到1.7.0_25 x64。现在有些东西阻止了Grails 2.0.4的运行,正如可以从发布的命令行输出中看到的那样。我的环境变量和路径是正确的,我删除了 .grails
目录,并且我重新启动了我的计算机,但其中没有一个帮助解决了问题。
$ b
错误的第一行很奇怪,因为它看起来像一个不存在的路径 C:\Program
。我想知道是否因为空间 C:\ Program Files \ ???
而导致其余路径被黑掉,但这只是一个想法。
我已经尝试了所有答案这个问题,其中没有一个帮助解决我的问题。
。
更新:
JIRA问题列出的工作这里表示要更改 startGrails.bat $ c的第60行$ c $>
set AGENT_STRING = -javaagent:%GRAILS_HOME:\ = /%/ lib / com.springsource .springloaded / springloaded-core / jars / springloaded-core-1.0.5.jar -noverify -Dspringloaded = profile = grails
到这个:
set AGENT_STRING = - javaagent: %GRAILS_HOME:\ = /%/ lib / com.springsource.springloaded / springloaded-core / jars / springloaded-core-1.0.5.jar-noverify -Dspringloaded = profile = grails
这样做后,我得到一个新的错误:
C:\Users\westerhold> grails
异常:线程main中UncaughtExceptionHandler抛出的java.lang.NumberFormatException
C:\ Users \westerhold>
我不知道为什么,但是当我使用旧版本的Java我没有任何问题。我不知道是不是因为我的老版本的Java是Java 6而不是Java 7,或者是因为我的老版本Java是32位而不是64位,而是设置我的 JAVA_HOME $当使用Grails 2.0.4时,c $ c>变量指向旧版Java。
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\ubiquibacon>set
GRAILS_HOME=C:\Program Files\GGTS\grails-2.0.4
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_25
Path=C:\Program Files\Java\jdk1.7.0_25\bin;C:\Program Files\GGTS\grails-2.0.4\bin
C:\Users\ubiquibacon>grails
Error opening zip file or JAR manifest missing : C:/Program
Error occurred during initialization of VM
agent library failed to init: instrument
C:\Users\ubiquibacon>
I have two main Grails project I work with. Project "A" is in production is developed with Grails 2.0.4 using Netbeans, project "B" is still a prototype and is developed with Grails 2.2.4 using GGTS. I have a .bat
script I run to quickly change my GRAILS_HOME
and PATH
variables when switching between the two versions of Grails. This worked well until I decided to play around and open project "A" in GGTS. I also recently upgraded Java from 1.6.0_18 x86 to 1.7.0_25 x64. Now something is preventing Grails 2.0.4 from running at all as can be seen from the posted command line output. My environment variables and path are correct, I have deleted the .grails
directory, and I have restarted my computer, none of which have helped correct the problem.
The first line of the error is curious because it appears to be looking in a non-existent path C:\Program
. I wonder if the rest of the path may be getting hacked off because of a space C:\Program Files\???
but that is just a thought.
I have already tried all the answers to this question, none of which helped solve my issue.
Any guidance would be appreciated.
Update:
A work around listed in the JIRA issue here says to change line 60 of startGrails.bat
from this:
set AGENT_STRING=-javaagent:%GRAILS_HOME:\=/%/lib/com.springsource.springloaded/springloaded-core/jars/springloaded-core-1.0.5.jar -noverify -Dspringloaded=profile=grails
to this:
set AGENT_STRING="-javaagent:%GRAILS_HOME:\=/%/lib/com.springsource.springloaded/springloaded-core/jars/springloaded-core-1.0.5.jar" -noverify -Dspringloaded=profile=grails
After doing that I get a new error:
C:\Users\westerhold>grails
Exception: java.lang.NumberFormatException thrown from the UncaughtExceptionHandler in thread "main"
C:\Users\westerhold>
I don't know why, but when I use the older version of Java I don't have any issue. I don't know if it is because my older version of Java was Java 6 instead of Java 7, or because my older version of Java was 32 bit instead of 64 bit, but setting my JAVA_HOME
variable to point to the older version of Java when using Grails 2.0.4 seems to be working.
这篇关于打开zip文件或JAR清单时缺少错误:C:/ Program的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!