{"id":463,"date":"2007-12-12T00:00:00","date_gmt":"2007-12-11T16:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=463"},"modified":"2011-07-15T09:46:40","modified_gmt":"2011-07-15T01:46:40","slug":"install-groovy-in-redhat-as4","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=463","title":{"rendered":"install Groovy in RedHat as4"},"content":{"rendered":"<p><DIV>\u5b98\u65b9\u7f51\u662f\u8fd9\u6837\u5199\u7684\uff1a<BR>1,first, Download a binary distribution of Groovy and unpack it into some file on your local file system <BR>2,set your GROOVY_HOME environment variable to the directory you unpacked the distribution <BR>3,add GROOVY_HOME\/bin to your PATH environment variable <BR>4,set your JAVA_HOME environment variable to point to your JDK. On OS X this is \/Library\/Java\/Home, on other unixes its often \/usr\/java etc. If you&#8217;ve already installed tools like Ant or Maven you&#8217;ve probably already done this step. <\/DIV><br \/>\n<DIV>\u4f46\u4f1a\u51fa\u73b0\u9519\u8bef:<BR># groovysh<BR>java.lang.NoClassDefFoundError: org\/objectweb\/asm\/ClassVisitor<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at groovy.lang.GroovySystem.&lt;clinit&gt;(GroovySystem.java:27)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.codehaus.groovy.runtime.Invoker.&lt;init&gt;(Invoker.java:38)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.codehaus.groovy.runtime.InvokerHelper.&lt;clinit&gt;(InvokerHelper.java:44)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:225)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.codehaus.groovy.tools.shell.Main.&lt;clinit&gt;(Main.groovy:34)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:597)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:101)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)<\/DIV><br \/>\n<DIV><BR>\u89e3\u51b3\u529e\u6cd5:<BR>#vi \/etc\/profile<\/DIV><br \/>\n<DIV>\u52a0\u5165GROOVY_HOME<BR>export GROOVY_HOME=&#8221;\/home1\/software\/groovy-1.5.0\/&#8221;<\/DIV><br \/>\n<DIV>\u4fee\u6539CLASSPATH<BR>export CLASSPATH=.:$JAVA_HOME\/lib\/dt.jar:$JAVA_HOME\/lib\/tools.jar:&#8221;\/home1\/lib\/&#8221;:$GROOVY_HOME\/lib\/ant-1.7.0.jar:$GROOVY_HOME\/lib\/asm-2.2.jar:$GROOVY_HOME\/lib\/bsf-2.4.0.jar:$GROOVY_HOME\/lib\/jline-0.9.93.jar:$GROOVY_HOME\/lib\/mx4j-3.0.2.jar:$GROOVY_HOME\/lib\/ant-junit-1.7.0.jar:$GROOVY_HOME\/lib\/asm-analysis-2.2.jar:$GROOVY_HOME\/lib\/commons-cli-1.0.jar:$GROOVY_HOME\/lib\/jsp-api-2.0.jar:$GROOVY_HOME\/lib\/servlet-api-2.4.jar:$GROOVY_HOME\/lib\/ant-launcher-1.7.0.jar:$GROOVY_HOME\/lib\/asm-tree-2.2.jar:$GROOVY_HOME\/lib\/commons-logging-1.1.jar:$GROOVY_HOME\/lib\/junit-3.8.2.jar:$GROOVY_HOME\/lib\/xpp3_min-1.1.3.4.O.jar:$GROOVY_HOME\/lib\/antlr-2.7.6.jar:$GROOVY_HOME\/lib\/asm-util-2.2.jar:$GROOVY_HOME\/lib\/groovy-1.5.0.jar:$GROOVY_HOME\/lib\/mockobjects-core-0.09.jar:$GROOVY_HOME\/lib\/xstream-1.2.2.jar<\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b98\u65b9\u7f51\u662f\u8fd9\u6837\u5199\u7684\uff1a1,first, Download a binary distribution of Groovy and unpack it into some file on your local file system 2,set your GROOVY_HOME environment variable to the directory you unpacked the distribution 3,add GROOVY_HOME\/bin to your PATH environment variable 4,set your JAVA_HOME environment variable to point to your JDK. On OS X this is \/Library\/Java\/Home, on other &hellip; <a href=\"https:\/\/www.strongd.net\/?p=463\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">install Groovy in RedHat as4<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[120],"class_list":["post-463","post","type-post","status-publish","format-standard","hentry","category-linux","tag-groovy"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=463"}],"version-history":[{"count":1,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/463\/revisions"}],"predecessor-version":[{"id":907,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/463\/revisions\/907"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}