Java code for Spitfire