This is a Java version error that appears when I install Salesforce Apex Extension in Visual Studio Code, but it didn't hurt anything, so I left it for a long time. However, I thought it would be awkward if I jumped out during the webinar recently, so I decided to take the initiative to resolve it. This time, I will introduce how to do it.
The error message is as follows, with a message telling you to use Java 8 or 11, along with a link to how to configure it.
An unsupported Java version was detected. Download and install Java 8orJava11toruntheextensions.Formoreinformation,seeSetYourJavaVersion.
Setting method (English) page introduces the setting method with the following four JDKs. So, choose the one that suits your environment.
In my case, I chose Zulu, which was taught by seniors in the Salesforce community. Salesforce's data loader also Specifies Zulu OpenJDK version 11 as a system requirement, so I'll match it.
After that, follow the instructions on the Setting method (English) page and add the following description to the VS Code configuration file. Append.
setting.json
{
"salesforcedx-vscode-apex.java.home": "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home"
}
With this, you should be able to get rid of the error.
Recommended Posts