For the purpose of compiling TrackStudio, you will need Java SDK and Apache Ant. It would be even better if you have some IDE, but for minor changes even a simple text editor will be sufficient.
How to compile the project without using IDE
Make sure that Ant is installed correctly. For this, in the command line or terminal you have to type
ant