java how to find a path by name code example Example: get file path java File file = new File("yourfileName"); String path = file.getAbsolutePath();