By doing a trivial but subtle rearrangement in the ARGUMENTS processing in startGroovy, I think I have circumvented (not fixed) Michael's problem. I suspect though that there are new space problems that will haunt us.

I am still not sure there is a quoting of the -Dscript.name that fixes Daniel's problem.

Russel Winder
added a comment - 13/Dec/07 12:27 PM By doing a trivial but subtle rearrangement in the ARGUMENTS processing in startGroovy, I think I have circumvented (not fixed) Michael's problem. I suspect though that there are new space problems that will haunt us.
I am still not sure there is a quoting of the -Dscript.name that fixes Daniel's problem.

Russel, you'll have to blame Bill for the spaces in filenames . I guess M$ got so carried away by the possibility of having spaces in filenames that they put them everywhere they could.
"C:\Programs" or "Applications" would be much better, but they had to use a long name and put a space there. Same for "Documents and Settings" (which BTW, because "Users" in Vista).

</rant>

I think I've fixed it, by undoing the mentioned change, defining a SCRIPT_NAME=$0 variable in groovy and adding -Dscript.name=$SCRIPT_NAME to startGroovy, but I'll have to test some more.

Daniel Serodio
added a comment - 14/Dec/07 7:13 AM Russel, you'll have to blame Bill for the spaces in filenames . I guess M$ got so carried away by the possibility of having spaces in filenames that they put them everywhere they could.
"C:\Programs" or "Applications" would be much better, but they had to use a long name and put a space there. Same for "Documents and Settings" (which BTW, because "Users" in Vista).
</rant>
I think I've fixed it, by undoing the mentioned change, defining a SCRIPT_NAME=$0 variable in groovy and adding -Dscript.name=$SCRIPT_NAME to startGroovy , but I'll have to test some more.
Should I create a patch? Against which version?

I just tried your idea and it works like a charm, In fact, I think removing the setting of the JAVA_OPTS from the groovy scripts and then putting SCRIPT_PATH="$0" in startGroovy and then the -D line in the exec statement, provides a solution for all the scripts.

Russel Winder
added a comment - 14/Dec/07 1:36 PM I just tried your idea and it works like a charm, In fact, I think removing the setting of the JAVA_OPTS from the groovy scripts and then putting SCRIPT_PATH="$0" in startGroovy and then the -D line in the exec statement, provides a solution for all the scripts.
I shall commit this and then see if I embarrass myself again

I have reverted a refactoring and fiddled a bit and now all the cases listed here seem to work as they should. I suspect though that there are many more issues left to find in teh case of Cygwin. The problem is all the parameter processing that goes on to try and convert path names.

Russel Winder
added a comment - 14/Dec/07 2:08 PM I have reverted a refactoring and fiddled a bit and now all the cases listed here seem to work as they should. I suspect though that there are many more issues left to find in teh case of Cygwin. The problem is all the parameter processing that goes on to try and convert path names.