DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Aniket Vaishnav
Aniket Vaishnav

Posted on

Set up your VS Code for Java development

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

It includes a bunch of useful extensions. Which are :
List of Extension<br>
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tnpyybhy7rak9frkd8i2.png) in Java Extension Pack

  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

It Emulates not only the new project but also the class path and .project files. You can find this extension here. 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, 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

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

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

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.

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

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

Tomcat for Java

Image description

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

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

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
Enter fullscreen mode Exit fullscreen mode

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.

Top comments (0)

🌚 Life is too short to browse without dark mode