code: public static void registerSmbURLHandler () {
          String pkgs;
          float ver = Float.parseFloat(Runtime.class.getPackage().getSpecificationVersion());
          String vendor = System.getProperty("java.vendor.url");
          if ( ! ( vendor != null && vendor.startsWith("http://www.android.com") ) && ver < 1.7f ) {
              throw new RuntimeCIFSException("jcifs-ng requires Java 1.7 or above. You are running " + ver);
          }
  
          SingletonContext.getInstance();
          pkgs = System.getProperty("java.protocol.handler.pkgs");
          if ( pkgs == null ) {
              System.setProperty("java.protocol.handler.pkgs", "jcifs");
          }
          else if ( pkgs.indexOf("jcifs") == -1 ) {
              pkgs += "|jcifs";
              System.setProperty("java.protocol.handler.pkgs", pkgs);
          }
      }
docs: This static method registers the SMB URL protocol handler which is
  required to use SMB URLs with the <tt>java.net.URL</tt> class. If this
  method is not called before attempting to create an SMB URL with the
  URL class the following exception will occur:
  <blockquote>
  
  <pre>
  Exception MalformedURLException: unknown protocol: smb
  at java.net.URL.&lt;init&gt;(URL.java:480)
  at java.net.URL.&lt;init&gt;(URL.java:376)
  at java.net.URL.&lt;init&gt;(URL.java:330)
  at jcifs.smb.SmbFile.&lt;init&gt;(SmbFile.java:355)
  ...
  </pre>
  
  <blockquote>