You should be able to add an extra `/` without checking if it already there. At least on *nix systems. Otherwise you can use `new File(path, "eclipse.ini")` later in the code, to bypass any path separator problem.