我正在尝试在Windows java rembrandt.bin.Rembrandt
中运行一个groovy项目,我收到以下错误
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/groovy/r
untime/BytecodeInterface8
at rembrandt.bin.Rembrandt.<init>(Rembrandt.groovy)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstru
ctor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteN
oUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstru
ctor(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor
(AbstractCallSite.java:190)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor
(AbstractCallSite.java:198)
at rembrandt.bin.Rembrandt.main(Rembrandt.groovy:383)
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.Bytecod
eInterface8
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more
我正在使用java 8.有趣的是我试图在Linux中运行并且程序运行。在Linux中我运行的是java 7,但是已经尝试在Windows中使用java 7而没有任何东西。我使用groovy 1.7.5并且这个类(BytecodeInterface8)只出现在1.8.0中我无法理解为什么这在Linux中运行良好而不在Windows中运行。 Ty为你提供帮助