title: Commons VFS and Java.net.URL - Adding support for "sftp://" protocol
body: <p>We're trying to use <a href="http://commons.apache.org/vfs/" rel="noreferrer">Apache Commons VFS</a> to access something over SFTP. <a href="http://commons.apache.org/vfs/filesystems.html#SFTP" rel="noreferrer">It claims to support SFTP</a>, however we're getting a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/MalformedURLException.html" rel="noreferrer">MalformedURLException</a> when it starts. Digging around I see that apache vfs is using <a href="http://java.sun.com/javase/6/docs/api/java/net/URL.html" rel="noreferrer"><code>java.net.URL</code></a>. However the documentation tells me that it doesn't actually support <code>sftp://</code> URLs.</p>
  
  <blockquote>
    <p>Protocol handlers for the following protocols are guaranteed to exist on the search path :-</p>
  
  <pre><code>    http, https, ftp, file, and jar
  </code></pre>
    
    <p>Protocol handlers for additional protocols may also be available. </p>
  </blockquote>
  
  <p>I'm using java 1.6.0 on Linux. How can I prevent <code>java.net.URL</code> from throwing a wobbly when it sees a <code>sftp://</code> URL? I need to keep using the Apache commons VFS library, which uses <code>java.net.URL</code>.</p>