Write java file