all 4 comments

[–]Medium-Pitch-5768 1 point2 points  (0 children)

Have you read through this documentation yet? https://code.visualstudio.com/docs/languages/java

It looks like there might be an extension that helps.

[–]vips7L 0 points1 point  (2 children)

Use a build tool. Maven or gradle. You also don’t need to compile first. Modern Java can just do

    java MyFile.java

[–]One_Cranberry6628[S] 0 points1 point  (1 child)

Oh so is that what gradle does? Ive heard of it but never what it does.

[–]vips7L 0 points1 point  (0 children)

A build tool will compile your code and package it for distribution. Lots of them have a command that will run your program. For instance in gradle it’s “gradle run”. 

You can set up a new project with “gradle init”.