code: public String getAbsolutePath(String path) throws SftpStatusException,
  			SshException {
  		try {
  			UnsignedInteger32 requestId = nextRequestId();
  			Packet msg = createPacket();
  			msg.write(SSH_FXP_REALPATH);
  			msg.writeInt(requestId.longValue());
  			msg.writeString(path, CHARSET_ENCODING);
  			sendMessage(msg);
  
  			SftpMessage bar = getResponse(requestId);
  			if (bar.getType() == SSH_FXP_NAME) {
  				SftpFile[] files = extractFiles(bar, null);
  
  				if (files.length != 1) {
  					close();
  					throw new SshException(
  							"Server responded to SSH_FXP_REALPATH with too many files!",
  							SshException.CHANNEL_FAILURE);
  				}
  
  				return files[0].getAbsolutePath();
  			} else if (bar.getType() == SSH_FXP_STATUS) {
  				int status = (int) bar.readInt();
  				if (version >= 3) {
  					String desc = bar.readString().trim();
  					throw new SftpStatusException(status, desc);
  				}
  				throw new SftpStatusException(status);
  			} else {
  				close();
  				throw new SshException(
  						"The server responded with an unexpected message",
  						SshException.CHANNEL_FAILURE);
  			}
  		} catch (SshIOException ex) {
  			throw ex.getRealException();
  		} catch (IOException ex) {
  			throw new SshException(ex);
  		}
  
  	}
docs: Get the absolute path of a file.
  
  @param path
  @return String
  @throws SshException