Save input to Java file