*I* find that the best way to handle the "spaces in path" problem on windows is
to avoid it by using the '8dot3' version of a file/dir name:
===
C:\>dir /x
Volume in drive C has no label.
Volume Serial Number is D215-0F37
Directory of C:\
31/10/2023 08:01 AM <DIR> BIN
22/11/2023 06:58 PM <DIR> Dell
23/12/2023 09:44 PM <DIR> DEV
20/01/2024 10:41 AM <DIR> DEVTOOLS
13/01/2024 10:43 AM <DIR> Java
31/10/2023 07:42 AM <DIR> LIB
19/01/2024 09:23 AM <DIR> PROGRA~1 Program Files
30/12/2023 10:20 AM <DIR> PROGRA~2 Program Files (x86)
23/10/2023 07:24 PM <DIR> Users
10/01/2024 08:11 PM <DIR> Windows
24/11/2023 07:24 PM <DIR> WSL2
0 File(s) 0 bytes
11 Dir(s) 736,955,072,512 bytes free
C:\>set GROOVY_HOME=C:\PROGRA~2\Groovy
C:\>
===
Of course, this relies on the filesystem actually generating these alternative
filenames, not all do. To determine your situation:
=== (run as administrator):
C:\>fsutil 8dot3name query c:
The volume state is: 0 (8dot3 name creation is ENABLED)
The registry state is: 2 (Per volume setting - the default)
Based on the above settings, 8dot3 name creation is ENABLED on "c:"
C:\>
===
Ref:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name
HTH
BOB
-----Original Message-----
From: Paul King <[email protected]>
Sent: Friday, January 19, 2024 10:00 PM
To: [email protected]
Subject: Re: Groovy on Windows 11, unable to resolve class
Or do you already have GROOVY_HOME set but to somewhere else?
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Thu, Jan 18, 2024 at 9:58 PM Søren Berg Glasius <[email protected]> wrote:
>
> I'm not at windows user myself, but seems to remember, that is most likely
> because of the spaces in "C:\Program Files (x86)\Groovy\"
>
> Den tors. 18. jan. 2024 kl. 11.47 skrev poubelle zenira
> <[email protected]>:
>>
>> I just installed groovy 4 on windows from the installer.
>>
>> When running groovysh I get:
>> "ClassNotFoundException: org.apache.groovy.groovysh.Main"
>>
>> And when trying to import a groovy, i get an "unable to resolve
>> class" error
>>
>> I checked the windows path,
>> GROOVY_HOME is set to C:\Program Files (x86)\Groovy\, where groovy is
>> installed (I leaved the default installation parameters) And I manually
>> added %GROOVY_HOME%\bin to the path because it was not there.
>>
>> But it still doesn't work.
>
>
>
> --
>
> Med venlig hilsen,
> Søren Berg Glasius
>
> Hedevej 1, Gl. Rye, 8680 Ry
> Mobile: +45 40 44 91 88
> --- Press ESC once to quit - twice to save the changes.