private static void writeVersionToVerFile(String version) throws IOException {
        //declared in a try-with-resource statement, it will be closed regardless of it completes normally or not      
    	try (PrintWriter writer = new PrintWriter(new File(DoradusServer.class.getResource("/" + VERSION_FILE).getPath()))) {
    		writer.write(version);
    	}

    }
private static void writeVersionToVerFile ( String version ) throws IOException { try ( PrintWriter writer = new PrintWriter ( new File ( DoradusServer . class . getResource ( "/" + VERSION_FILE ) . getPath ( ) ) ) ) { writer . write ( version ) ; } }
Write version to local file