You can develop Java applications on any computer and transfer the code or the compiled JAR-file to a Raspberry Pi to execute it. But Raspberry Pi 4 and 5 are definitely powerful enough to run an Integrated Development Environment (IDE)!
Visual Studio Code (VSC) is the free IDE (Integrated Developer Environment) by Microsoft. It’s designed as a universal tool that you can use for multiple programming languages with extensions.
You can download VSC directly from the website, but it’s also available as a Raspberry Pi OS apt package. Use the following commands to install it from the terminal:
$ sudo apt update
$ sudo apt install code -y
When VSC is installed, start it from “Start > Programming > Visual Studio Code”. There are many extensions available to make it the perfect IDE for many programming languages and other tasks. Make sure to install the following ones to make it your perfect Java-companion: