String file = MessageTask3.class.getResource("").getFile();
File:
public static final String separator
separatorChar
File.separator