Set up your VS Code for Java development
Tags: java, vscode, productivity, beginners
Published: 2022-03-22 12:36:35


## Context
Some programmers just make the whole coding process cool. They work a lot, they work so fast, have the wide variety of add-ons to help them with. Ever had that feeling, then you are at the correct place, stay with me and let's explore the journey to set up your VS Code for Java programming.

Hi there, I am using VS Code now for at least five years. I started with C++ moved to Java, then Python and JavaScript, but I still like to stick with Java. So, if you are like me, then these are must-have java setups you must do in your VS Code, or shall I say **7 Must have Java Extensions in your VS Code** 

---

# Java Extension Pack — Microsoft
This is a must-have and very popular extension available. I am sure if you have done some previous research, you might come across this extension in the list. 

[![Java Extension Pack — Microsoft](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udg3pi7mmsgcsy09tlpy.PNG)](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)

It includes a bunch of useful extensions. Which are : 
![List of Extension
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tnpyybhy7rak9frkd8i2.png) in Java Extension Pack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vj9o288p9q248aip5ymz.png)
1. Visual Studio IntelliCode
2. Language Support for Java(TM) by Red Hat 
3. Debugger for Java
4. Maven for Java
5. Test Runner for Java
6. Project Manager for java

# Eclipse New Java Project

Hey, working on java. I'm sure you must come across the IDE or told to use IDE known as Eclipse. Well, this is very beginner-friendly, in terms of getting started with a simple new project. If you are looking same to do such in your favorite VSCode this is the extension you might consider. 

[![Eclipse New Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/muz1iopfjtfs1teppjiy.png)](https://marketplace.visualstudio.com/items?itemName=mellena1.eclipse-new-java-project)

It Emulates not only the new project but also the class path and .project files. You can find this extension [here](https://marketplace.visualstudio.com/items?itemName=mellena1.eclipse-new-java-project). Also if you are so habitual to eclipse key bindings and want to use it within your VSCode as well then you can also try [Eclipse Keymap](https://marketplace.visualstudio.com/items?itemName=alphabotsec.vscode-eclipse-keybindings), which take your keyboard shortcuts from eclipse and make it work similar in as they would have worked in eclipse.


# Project Manager
Working with lot many projects can be difficult, but what if I tell you, that your all projects can be managed easily and you can shift within your projects seamlessly. 

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mcn965k9px4ttu0ejxsz.png)](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager)

Well this extension does this on behalf of you. It is able to manage your project, list them, swap your workspace, creates workspace, and the best part integrates fairly well with git. If you are someone who is surrounded with bunch of different projects at same time, then you should surely give this a try. You can get this extension here. [here](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager)

# Prettier - Code formatter
Well if you are an experience developer and you have not a Prettier (or any other code formatter), then you will be judged seriously.

[![Prettier - Code formatter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ewlqmhwdg5qucvnmmrd.png)](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

The main use of this extension is to format your code make it more readable, align with proper indentation.
Well their are many code formatters out there but prettier is one of the best, if not the best. It supports JavaScript, TypeScript, JSX, JSON
CSS, SCSS, HTML, Vue, Angular, GraphQL, Markdown, YAML, and what not. It also has a configuration file flexibility which will let you to specify what all things should be taken care of while formatting the code. Highly recommend to check it out [here](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).

# Code Spell Checker

I am a programmer, why should I take care of spellings instate I should take care of if, else, for's and so on. Alas, that's not the truth though, you need to have the readable code whenever you code any. 

[![Code Spell Checker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hfmapqmublyo5j8d6dgn.png)](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)

As there is no escape, but this one extension will give you relief while writing the code, as you can focus on the logic and spellings would be check by itself, yes it supports camelCases, snake_cases. Also it compatible with Italian, Spanish, Persian languages, and much more. Also is applicable on most of the programmings languages. Do check it out you choice of language is present or not [here](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)


# Tomcat for Java

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rhpj0e0ztpf1ou4z0cu.png)](https://marketplace.visualstudio.com/items?itemName=adashen.vscode-tomcat)

Coding in Java, working with servers like tomcat and jetty, I know what you are going with, in java we have jars as the server it's good if you get it via maven, if you don't wish to get any but opt for setting up the path to a local jar, even if you set the path right to manage it is still a cumbersome Adhoc task. This one extension has made life simple. It is just simple and efficient. It maintains your entire war pkg, run / stop, debug, customize JVM when running server.

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eef28cct9sdz0s7ssa53.png)](https://marketplace.visualstudio.com/items?itemName=SummerSun.vscode-jetty)

Many of developers also use jetty, and similar extension for jetty is Jetty for Java, with almost same features but designed for Jetty

# Java Code Generators

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fwzdzfu7oktwwqqyajw6.png)](https://marketplace.visualstudio.com/items?itemName=sohibe.java-generate-setters-getters)

This is the best and most loving extension I've come across. It has the following features.

    Features
        Generator GUI
        Generate Setters & Getters
        Generate toString()
        Generate Constructor
        Generate Constructor Using Fields
        Generate Equals And HashCode
        Generate Fluent Setters
        Generate Logger Debug

These features are specially added keeping in mind the needs of Java programmers. Trust me you don't want to miss such an extension.

---

## TL;DR
Do click on each image to go to the specific extensions and get the self-explanatory info.


## On a closing note

These are specifically associated to Java developers and especially a beginner to intermediate phase, for more advanced setup do follow the new blog which includes spring boot extensions, quarks, etc.