Reputation: 196
I have just downloaded and installed Groovy 2.3.3 using the Windows installer. While trying to run some of the examples using groovyclient
(which tries to start groovyserver
), I receive the following error.
\Groovy\Groovy-2.3.3\bin\..
was unexpected at this time.
My Groovy_Home
is as follows:
GROOVY_HOME=C:\Program Files (x86)\Groovy\Groovy-2.3.3
The full output is as follows:
C:\Users\Greg>groovyserver
Groovy home directory: "C:\PROGRA~2\Groovy\GROOVY~1.3"
Groovy command path: "C:\PROGRA~2\Groovy\GROOVY~1.3\bin\groovy.bat" (found at GR
OOVY_HOME)
\Groovy\Groovy-2.3.3\bin\.. was unexpected at this time.
I am running on Windows 7 Home Premium - 64 bit
Upvotes: 4
Views: 445
Reputation: 18563
Not sure if this is a universal solution but here's what worked for me on two separate machines running Windows 7 Home Premium (64) and Windows 7 Enterprise (64).
I tried this out with both Groovy 2.2.1 and Groovy 2.3.4
I simply uninstalled Groovy and installed it again, this time outside the Program Files
directory. The groovyclient
and groovyserver
tools started working properly and I no longer get these errors.
Apparently, Groovy has some trouble running the executables if they're installed in Program Files
. I'm not sure why this happens. I suspected that it may have something to do with spaces in the catalog's name but I successfully ran groovyclient
installed in such a directory ( C:\Groovy\Test groovy with spaces\Groovy-2.2.1
specifically). Therefore, I suspect this has something to do with permissions.
If anyone has an idea why this happens, feel free to expand upon this answer. Maybe the exact reason this error occurs is different and I just managed to work around it by changing the installation directory.
Upvotes: 1