Contents
What happens if I invoke two Groovy scripts which have different current working directory at the same time? For example, using sub-shell and pipe, two Groovy scripts concurrently are invoked:
$ (cd /tmp; groovyclient read.groovy ) | ( cd /var/tmp; groovyclient output.groovy )
This is the restricted case. Exception occurs when the second groovyclient command is invoked. Instead, the following works well:
$ (cd /tmp; groovyclient read.groovy ) | ( cd /tmp; groovyclient output.groovy )
Yes, you can. But you might see OutOfMemoryError of PermGen if you use transitive dependencies and invoke that script repeatedly. It is probably comes from the way to resolve transitive dependencies is different of resolving direct dependencies in Groovy. You can avoid this error by specify SystemClassLoader to use:
@GrabConfig(systemClassLoader=true)
@Grab("..")
I think it is caused by either reasons as follows: