Build VS Code + WSL + Java + Gradle environment from scratch

Install the JDK on Windows

--Check from the command line if the JDK is installed

C:\Users\User name> javac -version
javac 11.0.7

--If the JDK is not installed, install it with the installer

https://adoptopenjdk.net/ 「OpenJDK 11 (LTS)」「HotSpot」

--Check if the environment variable "JAVA_HOME" is set

C:\Users\User name>echo %JAVA_HOME%
C:\Program Files\AdoptOpenJDK\jdk-11.0.7.10-hotspot

If a blank is output, set the environment variable "JAVA_HOME"

Install VS Code on Windows

--Installer https://azure.microsoft.com/ja-jp/products/visual-studio-code/

Install extensions to work with Java in VS Code

Extension name code
Java Extension Pack vscjava.vscode-java-pack
Lombok Annotations Support for VS Code gabrielbb.vscode-lombok
Checkstyle for Java shengchen.vscode-checkstyle
SonarLint sonarsource.sonarlint-vscode
Gradle Language Support naco-siren.gradle-language
Markdown All in One yzhang.markdown-all-in-one
Remote - WSL ms-vscode-remote.remote-wsl

Install WSL on Windows

--Reference article https://qiita.com/oyngtmhr/items/a098e2da50bc7b58d75a

Make Java available on WSL

--Reference article https://qiita.com/sakamoto66/items/bf49584fa9f56a9fb808

Make Gradle available on WSL

--Reference article https://qiita.com/fedorax/items/40052e150865267d1fa0

Install VS Code extensions on WSL for development on WSL via VS Code

  1. Open WSL from "> <" at the bottom left of VS Code run-wsl.png
  2. Select the extension icon from the toolbar at the edge of the VS Code screen
  3. Install all the extensions you have on WSL vscode-java.png

Recommended Posts

Build VS Code + WSL + Java + Gradle environment from scratch
Build Java development environment with WSL2 Docker VS Code
Using Gradle with VS Code, build Java → run
Build a Java development environment with VS Code
Build Java development environment with VS Code on Mac
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
How to build Java development environment with VS Code
[Environment construction] Build a Java development environment with VS Code!
Java Spring environment in vs Code
Java build with mac vs code
Java development environment (Mac, VS Code)
Prepare Java development environment with VS Code
First gradle build (Java)
Build ruby debug environment with VS Code of Windows 10
[Note] Create a java environment from scratch with docker
Build Java program development environment with Visual Studio Code
The procedure I did when I prepared the environment of gradle + Java with VS Code (Windows 10)
Build docker environment with WSL
Java life starting from scratch
Using Docker from Java Gradle
Java web application development environment construction with VS Code (struts2)
Build WebAPP development environment with Java + Spring with Visual Studio Code
Build a Java project with Gradle
Code Java from Emacs with Eclim
Deep Learning Java from scratch 6.4 Regularization
[Note] A story about changing Java build tools with VS Code
Java 15 implementation and VS Code preferences
Let me do VS Code Remote Development + Java development in Proxy environment
Build Java development environment (for Mac)
Switch from Eclipse to VS Code
Sample code using Minio from Java
[Gradle] Build a Java project with a configuration different from the convention
Java EE 8 (using NetBeans IDE 8.2) starting from sample code Part 1 Environment construction
Introduction to Java development environment & Spring Boot application created with VS Code
Study Deep Learning from scratch in Java.
CICS-Run Java applications-(3) Build management with Gradle
Build a WAS execution environment from Docker
Deep Learning Java from scratch Chapter 1 Introduction
Build a Java development environment on Mac
Build Java 8 development environment on AWS Cloud9
Deep Learning Java from scratch 6.1 Parameter update
Hello World on Mac VS Code Java
[Java] Flow from source code to execution
Build Redmine code reading environment on Docker
Deep Learning Java from scratch Chapter 2 Perceptron
Deep Learning Java from scratch 6.3 Batch Normalization
Build Cakephp environment from docker installation Ubuntu
Execute Java code from cpp with cocos2dx
Scala starting from scratch (environment construction mac)
Java scratch scratch
Try to build Java8 environment on Amazon Linux2
Make SpringBoot1.5 + Gradle4.4 + Java8 + Docker environment compatible with Java11
[Gradle] Build operations often performed in Java projects
Deep Learning from scratch Java Chapter 4 Neural network learning
Static code analysis with Checkstyle in Java + Gradle
Build and test Java + Gradle applications with Wercker
[Java] Build Java development environment on Ubuntu & check execution
Build Java environment and output hello world [Beginner]
Build Java x Spring x VSCode x Gradle on Docker (1)
Build an E2E test environment with Selenium (Java)
Build Spring Boot project by environment with Gradle