Java backend of my 2nd year project.