Getting things stood up for Java was not the greatest experience for me out-of-the-box when compared to other languages. JRE vs JDK for example: Does JRE come with JDK? What version should I use? Can I use a later version than the tutorial I am following?
I chose the editor of VSCode. Feel like I have gotten pretty used to its workflow and Java, so far, is easy to setup. Microsoft has done a good job of getting VSCode configured for Java including installing Java
You should definitly consider installing the bundled extension of VSCode-Java-Pack as it installs almost everything you need to write Java.
Another extension is the Java IDE which helps generate setters and getters, along with aother things.
creating files with VSCode
With all IDEs they have their special tricks for saving you time to write code. I see many shortcuts in the InteliJ IDE, and here are some similar ways you can do code generation with the VSCode editor:
- Creating a class/interface/enum/record
- select the folder
- click or run pallet command to create new file
- type the name and add
.javato the end
- when the file is created, you are prompted to select the type of class/interface/enum/record
- getters and setters
- install the Java IDE
- create a file and do your things
- right click inside the file’s content
- choose “Generate Getters and Setters”
- alt method of getters and setters
- there is a library called lombok that will help set the getters and setters as well
building with VSCode
When you have a
.java file in view you can build the file by hitting
F5. This should bring up a terminal window and build + run the