The environment I went to this time is as follows
OS: MacOS Catalina (version 10).15.4)
Java:14
Install "Java Extension Pack" with the extension. Execute the following command in VS Code to display the extension installation screen. 「Command + Shift + x」
Enter "java" on the search screen and select "Java Extension Pack" to install
If the screen below is displayed as a result of installation, select "Download manually".
If you download it manually, ↓ Installation completion will be displayed.
Download the JDK from the following site and install it (version 14 this time) https://www.oracle.com/java/technologies/javase-jdk14-downloads.html
If the Java path does not pass, you need to set JAVA_HOME. Execute the following command in the terminal to check the current JAVA_HOME.
/usr/libexec/java_home
Copy the execution result, open the VS Code setting screen and search for "java home".
Select "Edit with settings.json" and paste it to "java.home" below
Enter an appropriate sample code and execute debug
Recommended Posts