how to put java to external file