In order to write software in Java, you will need the Java Software Development Kit (SDK), which can be aquired freely from the internet. The SDK contains libraries, compiler, documentations and a bunch of other stuffs.
Java SDK, that’s pretty much the only requirement to start writing programs. However, to make our lives easier when writing, and to compile, we will want to use an Integrated Development Environment (IDE). An IDE is a software that have features that help you program, compile, build and test run the program that you just wrote. Many IDE have error detection that will help you make your program work. Trust me, just go with it. You don’t want to write your whole program in Notepad, compile it in Command Line, take all those effort and just have it crash at the end not knowing what went wrong.
There are many IDEs out there. For Java, there are Netbeans, Eclipse, Dr. Java, etc. You can choose whatever you want, the programming language is the same, I personally like Netbeans the most and strongly recommends it.
So now, go ahead, download and install your SDK and IDE. For now, we will use the Java Standard Edition (SE). Remember to install the SDK first, when you install the IDE, it will ask you where you install the SDK.