Assuming you have File object representing the original text file and a file name relative to itself (assuming relative to the directory the original text file is in), you can get a canonical filename like this:File textFile = new File("C:\\Documents and Settings\\JeffG1\\My Documents\\references.txt");
File directory = textFile.getParentFile();
String relativeFileName = getRelativeFileName(); // get it somehow
File fileForFileName = new File(directory, relativeFileName);
System.out.println(fileForFileName.getCanonicalPath());
Note that this code does NOT check for the existence of the file.