Java 11 not found


#1

I am getting the above error whenever I try to activate the WPI extension. I did not during the Alpha stage, yes I did remove and reinstall VS first. I tried this setting on the java json setting on my Mac, but it is not working:
“java.home”:"$HOME/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk",


#2

Whenever I try to Set the VS Code Home to FRC Home I get this:

Unable to write to Folder Settings because java.home does not support the folder resource scope.


#3

We know about the command setting issue, we are working on fixing it.

For your manually set java.home variable, you’re close, but it doesn’t expand environment variables. So that $HOME doesn’t work, and you have to put in the full path.


#4

This setting worked for me on Mac…

"java.home": "/Users/<your-user-name>/frc2019/WPILib_Mac-2019.1.1/jdk"

I didn’t expand all the files into ~/frc2019/ as the directions said to so you path may be different.
At least, you’ll need to change <your-user-name> to, uh, your user name.

Setting it to the jdk-11.0.1.jdk directory didn’t work but the jdk path did work.

To set java.home in VS Code go to the Code menu, select Preferences then Settings. Search for java.home then click Edit in settings.json. Then, in the right pane add a line with the setting. Be sure to separate the setting from others with a comma.


#5

I believe that worked! My MacBook is old and it took a while for Java to load, eventually I got the thumbs up and a Java on the status bar; I was able to import last years code too.

I have a bunch of students with MacBooks that are at the same point; I’ll have them try this when we meet this afternoon. If I can get them going, this issue is slayed.