Has anybody managed to get Groovy installed on a z/OS system. I downloaded the source and the package is built using Maven. I then downloaded maven but when I ran pax it failed due to @LongLink references that pax couldn't handle.
I suppose I could manually go through the maven build process but that seems like a lot of work!
Groovy is shaping up to be a fantastic language. I think it would be a fantastic addition to z/OS.
Groovy on z/OS
-
- Posts: 4
- Joined: Wed Nov 15, 2006 5:29 am
- Location: Perth, Australia
- Contact:
-
- Posts: 4
- Joined: Wed Nov 15, 2006 5:29 am
- Location: Perth, Australia
- Contact:
I've installed groovy-1.0-JSR-06 on z/OS and performed some rudimentary testing, running groovysh and compiling and running a groovy script. Please feel free to pick up from here and do some more testing.
If problems crop up, they will almost certainly be related to character encoding. If you see any, pass them on and we'll see if we can get them addressed.
Installation steps:
Get the .zip version of the latest build: groovy-1.0-jsr-06.zip
From a z/OS shell:
Export a GROOVY_HOME environment variable
Add GROOVY_HOME/bin to your PATH
Ensure that JAVA_HOME is set to point to an installed JDK
To run a groovy shell:
To compile and run a script, create the file "hello.groovy":
Then compile and run:
If problems crop up, they will almost certainly be related to character encoding. If you see any, pass them on and we'll see if we can get them addressed.
Installation steps:
Get the .zip version of the latest build: groovy-1.0-jsr-06.zip
From a z/OS shell:
Code: Select all
jar -xvf groovy-1.0-jsr-06.zip
ln -s groovy-1.0-jsr-06.zip groovy
cd groovy
for i in bin/*; do; iconv -f iso8859-1 -t ibm-1047 $i > $i.e; mv $i.e $i; done
for i in conf/*; do; iconv -f iso8859-1 -t ibm-1047 $i > $i.e; mv $i.e $i; done
chmod +x bin/*
Add GROOVY_HOME/bin to your PATH
Ensure that JAVA_HOME is set to point to an installed JDK
To run a groovy shell:
Code: Select all
groovysh
Code: Select all
println "hello, world"
for (arg in this.args ) {
println "Argument:" + arg;
}
Code: Select all
groovy test.groovy foo bar baz
-
- Posts: 4
- Joined: Wed Nov 15, 2006 5:29 am
- Location: Perth, Australia
- Contact:
groovy loads a lot of java to get started. If you have the 5.0 SDK on z/OS, you can use the shared classes feature to get better startup performance.
You should see an improvement in startup times after the first groovy run. Note that this feature is not available under the 1.4 SDK.
Code: Select all
export JAVA_OPTS="-Xshareclasses"
-
- Posts: 4
- Joined: Wed Nov 15, 2006 5:29 am
- Location: Perth, Australia
- Contact:
Thanks for the tip. I didn't notice a big difference with groovy, but it's certainly noticeable when running Java programs.
I'm trying to run the following soap samples which results in an error. I don't know if this is due to character encoding, but it runs ok on XP.
BTW, your help is much appreciated. If you ever find yourself in Western Australia I'll shout you a few beers
.
I'm trying to run the following soap samples which results in an error. I don't know if this is due to character encoding, but it runs ok on XP.
Code: Select all
import groovy.net.soap.SoapServer
def server = new SoapServer("localhost", 6980)
server.setNode("MathService")
server.start()
Caught: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: SoapServer(java.lang.String, java.lang.Integer)
at SoapServer.run(SoapServer.groovy:3)
at SoapServer.main(SoapServer.groovy)

David Crayford
---------------------
Fundi Software
---------------------
Fundi Software