|
RE: Expected or unexpected: msg#00134lang.groovy.user
On Mon, 2004-11-22 at 10:45, Laforge Guillaume wrote: > Which JDK do you use? > Is it JDK 1.5? Yes. I have to use J2SE v5.0 as I have to use generic types. I guess Groovy does support this yet though. However the Groovy script I am trying to put together (to replace a Python script) doesn't need to know about generics. I am using Debian GNU/Linux Sarge with kernel 2.6.9 with Sun's JDK 1.5 installed by creating a deb file and installing that. As far as I am aware there are no problems with the JDK installation. I have found that whilst the script: #! /usr/bin/env groovy "ant".execute() works fine, the script: #! /usr/bin/env groovy //expectedPrompts = [ // "Enter length of first side: ", // "Enter length of second side: ", // "Enter length of third side: " // ] //outputIntroducers = [ // "Perimeter is: ", // "Area is: " // ] //testTuples = [ // ["0.0", "0.0", "0.0", "0.0", "0.0"], // ["0.0", "1.0", "1.0", "2.0", "0.0"], // ["1.0", "1.0", "2.0", "4.0", "0.0"], // ["1.0", "1.0", "1.0", "3.0", "0.433012"], // ["3.0", "4.0", "5.0", "12.0", "6.0"], // ["-1.0", "-1.0", "-1.0", "-", "-"], // ["1.0", "1.0", "3.0", "-", "-"], // ["1.0E1000", "1.0E1000", "1.0E1000", "Infinity", "NaN"] // ] // expectedPrompts.each { println it } antProcess = "ant".execute() // antProcess.in.eachLine { println it } produces the output: Exception in thread "main" java.lang.ClassFormatError: Invalid index 1 in LocalVariableTable in class file testIt at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at groovy.lang.GroovyClassLoader.access$100(GroovyClassLoader.java:81) at groovy.lang.GroovyClassLoader$ClassCollector.onClassNode(GroovyClassLoader.java:505) at groovy.lang.GroovyClassLoader$ClassCollector.call(GroovyClassLoader.java:515) at org.codehaus.groovy.control.CompilationUnit$5.call(CompilationUnit.java:604) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:844) at org.codehaus.groovy.control.CompilationUnit.classgen(CompilationUnit.java:540) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:446) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:244) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:163) at groovy.lang.GroovyShell$2.run(GroovyShell.java:220) at java.security.AccessController.doPrivileged(Native Method) at groovy.lang.GroovyShell.run(GroovyShell.java:218) at groovy.lang.GroovyShell.run(GroovyShell.java:165) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:385) at groovy.ui.GroovyMain.run(GroovyMain.java:251) at groovy.ui.GroovyMain.process(GroovyMain.java:234) at groovy.ui.GroovyMain.main(GroovyMain.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410) at org.codehaus.classworlds.Launcher.launch(Launcher.java:344) at org.codehaus.classworlds.Launcher.main(Launcher.java:461) I guess this must be a bug in Groovy so I guess I should enter a bug report. Unless of course I am doing something silly which is entirely possible given that I am a beginner. -- Russel. ============================================= Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel-Q5fiE77zhxfe9xe1eoZjHA@xxxxxxxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Expected or unexpected, Laforge Guillaume |
|---|---|
| Next by Date: | RE: Expected or unexpected, Laforge Guillaume |
| Previous by Thread: | RE: Expected or unexpected, Laforge Guillaume |
| Next by Thread: | RE: Expected or unexpected, Laforge Guillaume |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |