code: public static void registerSmbURLHandler() {
          String ver, pkgs;
  
          ver = System.getProperty( "java.version" );
          if( ver.startsWith( "1.1." ) || ver.startsWith( "1.2." )) {
               throw new RuntimeException( "jcifs.smb1-0.7.0b4+ requires Java 1.3 or above. You are running " + ver );
          }
          pkgs = System.getProperty( "java.protocol.handler.pkgs" );
          if( pkgs == null ) {
              System.setProperty( "java.protocol.handler.pkgs", "jcifs.smb1" );
          } else if( pkgs.indexOf( "jcifs.smb1" ) == -1 ) {
              pkgs += "|jcifs.smb1";
              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.<init>(URL.java:480)
  at java.net.URL.<init>(URL.java:376)
  at java.net.URL.<init>(URL.java:330)
  at jcifs.smb1.smb1.SmbFile.<init>(SmbFile.java:355)
  ...
  </pre><blockquote>