title: SFTP via java coding throws Exception and says Invalid absolute URI
body: <p><a href="http://www.memorylack.com/2011/06/apache-commons-vfs-for-sftp.html" rel="nofollow">Followed this code</a>  </p>
  
  <p>I get this error, and the only change I made in the program is I have hard code the arguments as </p>
  
  <pre><code>String  hostName = "122.183.217.133" ; 
  String username  = "root";
  String password = "something";
  String  localFilePath = "C://Sample.jpg";
  String  remoteFilePath = "/var/www/html/intranetupload/uploads/Sample.jpg";
  
  Jun 25, 2012 2:52:18 PM org.apache.commons.vfs2.VfsLog info
  INFO: Using "C:\DOCUME~1\MEENAK~1.DCK\LOCALS~1\Temp\vfs_cache" as temporary files store.
  Exception in thread "main" java.lang.RuntimeException: org.apache.commons.vfs2.FileSystemException: Invalid absolute URI "sftp://root:***@122.183.217.133:22/var/www/html/intranetupload/uploads/Sample1.jpg".
      at sftp.sample.Main.delete(Main.java:120)
      at sftp.sample.Main.main(Main.java:36)
  Caused by: org.apache.commons.vfs2.FileSystemException: Invalid absolute URI "sftp://root:***@122.183.217.133:22/var/www/html/intranetupload/uploads/Sample1.jpg".
      at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:61)
      at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:693)
      at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:621)
      at sftp.sample.Main.delete(Main.java:111)
      ... 1 more
  Caused by: org.apache.commons.vfs2.FileSystemException: Expecting / to follow the hostname in URI "sftp://root:***@122.183.217.133:22/var/www/html/intranetupload/uploads/Sample1.jpg".
      at org.apache.commons.vfs2.provider.HostFileNameParser.extractToPath(HostFileNameParser.java:155)
      at org.apache.commons.vfs2.provider.URLFileNameParser.parseUri(URLFileNameParser.java:50)
      at org.apache.commons.vfs2.provider.AbstractFileProvider.parseUri(AbstractFileProvider.java:188)
      at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:57)
      ... 4 more  
  </code></pre>
  
  <p>I don't have a domain name for the server. All I have is a ubuntu machine whose IP / username and password is known.
  My work needs deletion of files in that remote Ubuntu machine.</p>
  
  <p>Can you help me how to resolve the error?</p>