java file path linux

Java
Scanner s = new Scanner(new File("/home/me/java/ex.txt"));
Source

Also in Java: