executing jar (groovy language)
Hi experts,
I have a problem executing a jar file. Its in groovy language. My two classes: TestRunnerScript.class TestRunner.class Manifest: Main-Class: TestRunnerScript So I successfully made it a jar file by executing jar -cvmf manifest.txt iltester.jar *.class When I want to execute the jar file with this command java -jar iltester.jar, i get the following error Code:
Exception in thread "main" java.lang.NoClassDefFoundError: groovy/lan and when i did this Quote:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Groovy\Groovy-1 Can anyone tell me where did i made the mistake. Cause i couldnt able to run the jar file. If i execute the classes separately, it can be executed. Only problem is in jar file. Thanks in advance John |
I'm not familiar with 'groovy' but have experience with jarfiles. The first problem is that you need all your 'groovy' stuff to be in the jarfile, unless you tell it where to find them with -cp (classpath). In the second case, you gave it a classpath but didn't put quotes around it so it took the space between "Program Files" as the end of the classpath. And you still need to specify "-jar iltester.jar" after the classpath:
java -cp "C:\Program Files\Groovy\Groovy-1.7.1\embeddable\groovy-all-1.7.1.jar;iltester.jar" -jar iltester.jar Note no spaces in classpath either, unless they're part of the filename. |
All times are GMT -5. The time now is 10:42 PM. |