Chen!

Good news: your fix works. Here's more on what I did.

1. I ran fsutil 8dot3name set 0
2. I rebooted into Safe Mode
3. I ran fsutil file setShortName in Program Files (x86); "Windows Kits"
became WINKIT~1
4. I exited safe mode
5. I ran fsutil file setShortName in Program Files; "Microsoft Visual
Studio" became WINDOW~5
6. I ran bash configure --with-boot-jdk=/mnt/c/Users/swinx/.jdks/openjdk-22
--with-toolchain-path=/mnt/c/PROGRA~2/WINKIT~1/;/mnt/c/PROGRA~1/WINDOW~5

Bizarrely I needed to enter Safe Mode to set the short name of Windows
Kits, but not for Microsoft Visual Studio. Cygwin's bash fails at line 29:
dirname: command not found, which is another odd thing, but I've been using
WSL for a while so it's not a big deal. I also tried Erik's suggestion of
enabling 8dot3 generation and reinstalling VS, but that didn't add the
short names. The script never accepted the JAVA_HOME path as being valid,
so I have to put it in manually. I love Windows.

SWinxy

On Thu, Jul 11, 2024 at 12:42 PM Chen Liang <liangchenb...@gmail.com> wrote:

> Hi SWinxy,
> For not finding JDK, I recommend you set the %JAVA_HOME% environment
> variable to your latest Java installation. For VS, configure looks for the
> path and tries to fixpath, so you should be good mostly if you set the
> short names (just need no spaces) for "Windows Kits" and "Microsoft Visual
> Studio" in "Program Files" (usually already "PROGRA~1").
>
> And indeed, for the "Windows Kits" one, the log Anil got was extremely
> unhelpful too :( Hope these can help.
>
> Chen Liang
>

Reply via email to