If you use Pleiades All in One Eclipse, you can easily build the environment just by downloading the zip and unzipping it. However, since Visual Studio Code is popular in the world, I would like to verify how far Java development can be done with this. The goal is to develop a web app using Spring MVC. If you search for the introduction of development using Spring Boot, you will find many hits. Therefore, I dare to try the method that does not use Spring Boot. As of March 2020, there is also a reason that the project we are having is non-Boot Spring MVC web application development.
OS:Windows 10 Pro 64bit Editor:Visual Studio Code 1.42.1 JDK:AdoptOpenJDK 11.0.6+10 x64 Apache Maven:v3.6.3 Apache Tomcat:v9.0.31
This time I chose Adopt Open JDK. Also included in Pleiades Download from here. https://adoptopenjdk.net/
I want to install it in any location, so download the zip version.
Click "Other platform".
This time, I unzipped it to "D: \ JAVA \ JDK".
D:\JAVA
└─JDK
└─jdk-11.0.6+10
├─bin
├─conf
├─demo
├─include
├─jmods
├─legal
└─lib
Download from here. https://maven.apache.org/ Download and unzip apache-maven-3.6.3-bin.zip.
This time, I unzipped it to "D: \ JAVA \ Maven".
D:\JAVA
└─Maven
└─apache-maven-3.6.3
├─bin
├─boot
├─conf
└─lib
Download from here. http://tomcat.apache.org/
Download the v9.0 64-bit Windows zip.
This time, I unzipped it to "D: \ JAVA \ Tomcat".
D:\JAVA
└─apache-tomcat-9.0.31
├─bin
├─conf
├─lib
├─logs
├─temp
├─webapps
└─work
Set environment variables so that JAVA and maven will work no matter where you are in the folder.
JAVA_HOME="D:\JAVA\JDK\jdk-11.0.6+10"
MAVEN_HOME="D:\JAVA\Maven\apache-maven-3.6.3"
Path=%JAVA_HOME%\bin;%MAVEN_HOME%\bin;%Path%
For more information, see the commentary article here.
Beginners create Spring Tools Suite environment with VS Code https://qiita.com/ka-miwa/items/df168a0a0dcc3d8814e8
Open a command prompt and execute the following command.
java -version
D:\>java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
If you see something like this, you have successfully installed and set environment variables.
Open a command prompt and execute the following command.
mvn -v
D:\>mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: D:\JAVA\maven\apache-maven-3.6.3\bin\..
Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: D:\JAVA\JDK\jdk-11.0.6+10
Default locale: ja_JP, platform encoding: MS932
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
If you see something like this, you have successfully installed and set environment variables.
https://azure.microsoft.com/ja-jp/products/visual-studio-code/ You can download it from here. This time I installed User Installer 64bit.
Install the "Java Extension Pack". The extensions required for Java development will be installed.
For more information, see the commentary article here. "Building a Java development environment with VS Code" https://www.suzu6.net/posts/130-vscode-for-java/
Install "Tomcat for Java".
Install "Lombok Annotations Support for VS Code".
The environment has been built.
Beginners create Spring Tools Suite environment with VS Code https://qiita.com/ka-miwa/items/df168a0a0dcc3d8814e8
Build a Java development environment with VS Code https://www.suzu6.net/posts/130-vscode-for-java/