[Mac] Install Java in Visual Studio Code (VS Code)

Introduction

The environment I went to this time is as follows

OS: MacOS Catalina (version 10).15.4)
Java:14

Java installation

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 スクリーンショット 2020-06-01 22.06.44.png

If the screen below is displayed as a result of installation, select "Download manually".

スクリーンショット 2020-06-01 22.10.14.png

If you download it manually, ↓ Installation completion will be displayed. スクリーンショット 2020-06-01 22.11.58.png

JDK installation

Download the JDK from the following site and install it (version 14 this time) https://www.oracle.com/java/technologies/javase-jdk14-downloads.html スクリーンショット 2020-06-02 22.10.10.png

Through Path

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". スクリーンショット 2020-06-02 22.23.30.png

Select "Edit with settings.json" and paste it to "java.home" below スクリーンショット 2020-06-02 22.25.01.png

Operation check

Enter an appropriate sample code and execute debug スクリーンショット 2020-06-02 22.28.40.png

Recommended Posts

[Mac] Install Java in Visual Studio Code (VS Code)
[Mac] Install Java in Visual Studio Code
Java in Visual Studio Code
Add --enable-preview option in Java in Visual Studio Code
Java Spring environment in vs Code
Java build with mac vs code
Java development environment (Mac, VS Code)
Hello World on Mac VS Code Java
Install Java on Mac
Java.home cannot be set in visual studio code.
Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders
Build Java development environment with VS Code on Mac
Getting started with Java programs using Visual Studio Code
I couldn't type Japanese in Ubuntu20.04 + Visual Studio Code
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
Why can I develop Java with Visual Studio Code?
Build Java program development environment with Visual Studio Code
Write Java8-like code in Java8
Talk about using Java input wait (Scanner) in VS Code
Build WebAPP development environment with Java + Spring with Visual Studio Code
Use PlantUML with Visual Studio Code
Guess the character code in Java
Install Java development environment on Mac
Let me do VS Code Remote Development + Java development in Proxy environment
What I learned from doing Java work with Visual Studio Code
Prepare Java development environment with VS Code
A record of setting up a Java development environment with Visual Studio Code
Ruby on Rails in Visual Studio Codespaces
Enable code completion in Eclipse for Mac
All same hash code string in Java
Call Visual Recognition in Watson Java SDK
Java to C and C to Java in Android Studio
Install java and android-sdk on Mac using homebrew
Technology for reading Java source code in Eclipse
Run a Spring Boot project in VS Code
Static code analysis with Checkstyle in Java + Gradle
Code to escape a JSON string in Java
Try using Sourcetrail (win version) in Java code
Try using Sourcetrail (macOS version) in Java code
Using Gradle with VS Code, build Java → run
[AtCoder Problem-ABC001] C-Do wind observation in Java [Code]
Make a snippet for Thymeleaf in VS Code
Try debugging a Java program with VS Code
[Beginner] Install java development tool in cloud9 development environment.
[Java beginner's anguish] Hard-to-test code implemented in Junit
Build a Java development environment with VS Code
I tried "Visual Studio Code Installer for Java" which can create Java development environment immediately
Script Java code
Java code TIPS
Partization in Java
Java sample code 02
Java sample code 03
Changes in Java 11
Rock-paper-scissors in Java
Java sample code 04
Java sample code 01
Java character code
Pi in Java
Installing Visual Studio Code on Ubuntu 20.04 (automatic update support)
Sample code to convert List to List <String> in Java Stream
Build VS Code + WSL + Java + Gradle environment from scratch