I am using groovy-2.3.3, with jdk6u35. The groovy binaries have been extracted from groovy-sdk-2.3.3.zip.
After compiling with groovyc, I got an error while running java:
Unsupported major.minor version 51.0.
I googled and figured that the problem was with the groovy-all-2.3.3-indy.jar (which is used for jdk7+), so I removed it from my CLASSPATH. Now the program works, but it gives a warning:
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
How to disable this warning message, since I know that it is not applicable for my setup?
If I cannot disable this warning without a recompilation from source (which is not a valid option for me), is there any other groovy executable that I should download, instead of the sdk zip file, so that it can work with java-jdk6 without any warnings?
Turn off the warning for a project in Visual StudioSelect the Configuration Properties > C/C++ > Advanced property page. Edit the Disable Specific Warnings property to add 4996 . Choose OK to apply your changes.
Use a #pragma warning (C#) or Disable (Visual Basic) directive to suppress the warning for only a specific line of code.
Before I got
➜~ groovy -version
Aug 6, 2014 12:29:38 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-nio] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
Groovy Version: 2.3.4 JVM: 1.6.0_45 Vendor: Sun Microsystems Inc. OS: Linux
Editvim $JAVA_HOME/jre/lib/logging.properties
Set INFO to SEVERE or OFF java.util.logging.ConsoleHandler.level = SEVERE
After
➜~ groovy -version
Groovy Version: 2.3.4 JVM: 1.6.0_45 Vendor: Sun Microsystems Inc. OS: Linux
UPDATE (Second better solution):
Remove groovy-nio-2.3.6.jar from lib folder
➜ ~ groovy --version
Aug 15, 2014 11:45:56 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-nio] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
Groovy Version: 2.3.6 JVM: 1.6.0_34 Vendor: Sun Microsystems Inc. OS: Linux
➜ ~
➜ ~ mv $GROOVY_HOME/lib/groovy-nio-2.3.6.jar $GROOVY_HOME/lib/groovy-nio-2.3.6.bak
➜ ~
➜ ~ groovy --version
Groovy Version: 2.3.6 JVM: 1.6.0_34 Vendor: Sun Microsystems Inc. OS: Linux
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With