shyiko / jabba

(cross-platform) Java Version Manager
3.02k stars 198 forks source link

Spaces in path name #826

Open ananay22 opened 2 years ago

ananay22 commented 2 years ago

OS: Windows 10

Jabba will not take in to account spaces in names. Regular Java installs are at "C:\Program Files\Java", however, when you try and do jabba link system@version "C:\Program Files\Java\jdkversion" jabba returns the error: C:\Program\bin\java.exe wasn't found. If you believe this is an error - please create a ticket at https://github.com/shyiko/jabba/issues (specify OS and command that was used)

showing that it did not take the path after the space

ananay22 commented 2 years ago

seems to be a known issue with cobra: https://github.com/spf13/cobra/issues/1114

Teamop commented 2 years ago

workaround from https://github.com/shyiko/jabba/issues/582#issuecomment-826494926

aarighi commented 2 years ago

Same problem, installed jabba today and it still doesn't let me link my JDK under C:\Program Files.

UPDATE:

workaround from #582 (comment)

First workaround didn't work, but the second one (double quotes in single quotes) did the job. Thanks @Teamop