Hanashi stumbled a little on path trying to study Java with VScode

** VScode is good **, so I tried to touch it because it was propagated in synchronization. https://www.suzu6.net/posts/130-vscode-for-java/ When I was preparing the environment with reference to this person's blog, I posted it because I stumbled a little on how to pass the path.

Where I stumbled

Install the extension Java Extension Pack for Java in VScode and Create a new project using maven with ctlr + shift + p, I triumphantly compiled with F5 ...

Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment. 
The compiler compliance specified is 1.8 but a JRE 14 is used

I got an error like the one above.

Solution

For the time being, if you look at pom.xml

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

1.8…。 As a test, I changed this 1.8 to 14, and the error was resolved. It sounds like the wording that specifies the compiled version of java in maven.


When I looked it up, https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html There seems to be another way to set the compiler.

I want to be a fast-paced engineer. .. ..

Recommended Posts

Hanashi stumbled a little on path trying to study Java with VScode
How to reduce the load on the program even a little when combining characters with JAVA
How to compile Java with VsCode & Ant
Volume of trying to create a Java Web application on Windows Server 2016
I tried to break a block with java (1)
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
A story about PKIX path building failed when trying to deploy to tomcat with Jenkins
Submit a job to AWS Batch with Java (Eclipse)
A story about trying to get along with Mockito
[Java] How to execute tasks on a regular basis
[Java] How to start a new line with StringBuilder
A note that I had trouble when trying to use nginx with Remote-Containers of vscode
I tried to create a java8 development environment with Chocolatey
Java program to resize a photo into a square with margins
How to deploy a simple Java Servlet app on Heroku
[Beginner] Try to make a simple RPG game with Java ①
I want to make a list with kotlin and java!
I want to make a function with kotlin and java!
How to deploy a kotlin (java) app on AWS fargate
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
A memo to build Jitsi Meet on Azure with docker-compose
A memo to start Java programming with VS Code (2020-04 version)
Study Java: Use Timer to create something like a bomb timer
Launch a terminal on VScode
Java to play with Function
Connect to DB with Java
Connect to MySQL 8 with Java
Java study memo 2 with Progate
Study Java with Progate Note 1
Results of trying to use NVENC (CUDA) with Ubuntu 18.04 on WSL2
A story that I struggled to challenge a competition professional with Java
How to execute Postgresql copy command with column information on Java
A story of frustration trying to create a penetration environment on Ubuntu 20.04
I want to add a browsing function with ruby on rails
How to automatically operate a screen created in Java on Windows
Logic to draw a circle with ASCII art on the console
How to switch Java version with direnv in terminal on Mac
Connecting to a database with Java (Part 1) Maybe the basic method
Replace with a value according to the match with a Java regular expression
How to call with One Touch (without confirmation) on Android (Java)
Steps to build a Ruby on Rails development environment with Vagrant
How to build a little tricky with dynamic SQL query generation
When calling sshpass from Java with shell etc., it seems that it is necessary to have a path.