Commons VFS and Java.net.URL - Adding support for “sftp://” protocol

前端 未结 5 2163
梦如初夏
梦如初夏 2021-01-04 01:45

We\'re trying to use Apache Commons VFS to access something over SFTP. It claims to support SFTP, however we\'re getting a MalformedURLException when it starts. Digging arou

5条回答
  •  一个人的身影
    2021-01-04 02:17

    Depending on how your code is structured, you could remove the s before you give the string to the URL parsing method, set a flag, and if it validates, check that flag and put it back if it's set. It's ugly, but it'll provide a workaround.

提交回复
热议问题