and TypeScript, interest in VSC for other languages is growing rapidly.
The VSC marketplace is a one stop shop for such extensions which range from support for programming languages such as Python, Go, C++ etc. to Docker tools, CSV editors, scientific tools such as Protein Viewer right thorough to games such as Chrome Dinosaur Game!
For this blog we are interested in the Java programming Language.
You may well ask ‘why?’, not least as there are several widely used and well-respected IDEs available already for Java. For example, IntelliJ’s IDEA IDE is arguably the current market leader in Java development tools. It is available as both a free to use Community Edition and a paid for Ultimate edition. For most tasks the Community Edition is more than adequate and provides all the features you will generally need. The paid for Ultimate addition does add some nice to have features, such as profiling tools, support for Spring and some database tools but none of these are essential.
Well one reason is that VSC is not actually an IDE, it is a hugely talented and superior editor. As such it is much lighter weight than an IDE and tends not to have all those extras that you hardly ever user, but which can make the IDE more difficult to understand and navigate.
It also tends to require far less system resources than an IDE, in part because it is implemented using non-Java technologies (whereas Java based IDEs often make extensive use of Java itself) and in part because it does possess all the extras that we have come to expect from an IDE.
Another reason is that over the last 12 to 18 months numerous very experienced Java based colleagues have started to rave about VSC as a Java development environment. They have told me how good it is, how much they like it and how I should really give it a go!
Out of the box, VSC does not provide support for Java, instead a set of extensions / aka plugins must be installed to provide Java support. The easiest way to do this is to use the ‘Coding Pack for Java’. This is a preconfigured bundle of different extensions comprising:
The group of extensions are basically:
Unfortunately, the ‘Coding Pack for Java’ is only available for Windows and Macs. If you are on a Linux box, then you will have to install each of these components independently or try the ‘Extension Pack for Java’. Although for Linux you will have to provide your own JDK as appropriate for your platform (for example either OpenJDK or the Oracle JDK).
You can also install additional extensions / plugins to meet your specific requirements, such as:
The result is that you can freely configuration the VSC editor to match your exact requirements, and only those requirements.
This tends to mean that VSC when configured for Java is lighter weight than an equivalent IDE. It will have a smaller memory footprint, use less processor time and be more performant than a full blow IDE.
Of course, the downside is that you may well need to do a lot of installation and configuration work yourself. For an organisation it may make it harder to ensure that a standardised development environment is provided for all developers. It may also be more difficult to get commercial support for any issues that may occur.
As a developer who has primarily used a Java IDE of one kind or another for many years, the interface provided in VSC for configuring settings, organising a workspace (a VSC term for a combination of directories and their contents that are being worked on together) is quiet low level, compared to the UI menu or tabbed based interfaces of IDEs.
In summary then, VSC provides a free, light weight, editor that is a practical alternative to a full blown, heavier weight IDE. However, you may need to make some compromises to use it and there may be a learning curve involved in configuring VSC to meet your exact requirements.
If you found this article interesting you might be interested in our Java training courses.