How to disable warning for niogroovymethods

I am using groovy -2.3.3, with jdk6u35. The groovy binaries were extracted from groovy -sdk-2.3.3.zip.

After compiling with groovyc, I got an error when starting java:

Unsupported major.minor version 51.0.

I googled and realized that the problem is related to 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 installation?

If I cannot turn off this warning without recompiling from the source (which is not valid for me), is there any other groovy executable that I have to download instead of the zdk sdk file so that it can work with java-jdk6 without any or warnings?

+4
source share
1 answer

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

Edit vim $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 best solution):

Delete groovy -nio-2.3.6.jar from the 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
+8
source

Source: https://habr.com/ru/post/1545200/


All Articles