Fork me on GitHub
#calva
<
2022-09-14
>
ghosttoaster23:09:23

Calva keeps reporting that its "unable to find a java runtime". I have no idea where its looking because I have an ASDF installed java thats working globally in both zsh and fish

wevrem03:09:28

How are you starting VS Code? Are you on a mac? I have had trouble starting VS Code from the Finder and it doesn’t end up with all the right environment. If I start it from a terminal, it is okay. Maybe that is related to what you are seeing?

ghosttoaster04:09:31

Yeah it works if I start bscode from the terminal everything works. But launching it from the finder breaks.

ghosttoaster04:09:56

Which is crazy, right. Should be able t o launch an application from a Finder and it works.

pez04:09:54

Crazy indeed. It’s an old and known problem. There is a discussion, and some different solutions that might or might not work, here: https://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications

1
ghosttoaster12:09:56

Wow. Sheesh. Thank you!

wevrem15:09:11

BTW, @U3F5EM2TD how are you launching VS Code from the Finder? A year or so ago I created a Quick Action in the Automator app which lets me right click on a folder and, under the ‘Quick Actions’ submenu, launch VS Code. It didn’t get the path right half the time, and I’ve since habituated myself to starting from the terminal, but after checking out the SE link shared by @U0ETXRFEW, I think my automator script could be modified to set the correct path. The right-click shortcut is handy, but it doesn’t solve everything. What happens launching VS Code from the Dock? Or when VS Code restarts itself after an update? Who knows what the path is in those situations.

pez15:09:41

A thing you can try with the dock is to remove VS Code from it. Then start using the code command. Then right click the icon that now appears in the dock and select to keep in dock. It worked for me. I think. Haven’t dared fiddle with it since it started working so it could also be one of the other thousand things I tried.

ghosttoaster23:09:33

I've changed my default vscode terminal to zsh

ghosttoaster23:09:43

But its still not found.