code: public void loadJarClassifier(String modelName, Properties props) {
      Timing.startDoing("Loading JAR-internal classifier " + modelName);
      try {
        InputStream is = getClass().getResourceAsStream(modelName);
        if (modelName.endsWith(".gz")) {
          is = new GZIPInputStream(is);
        }
        is = new BufferedInputStream(is);
        loadClassifier(is, props);
        is.close();
        Timing.endDoing();
      } catch (Exception e) {
        String msg = "Error loading classifier from jar file (most likely you are not running this code from a jar file or the named classifier is not stored in the jar file)";
        throw new RuntimeException(msg, e);
      }
    }
docs: This function will load a classifier that is stored inside a jar file (if
  it is so stored). The classifier should be specified as its full filename,
  but the path in the jar file (<code>/classifiers/</code>) is coded in this
  class. If the classifier is not stored in the jar file or this is not run
  from inside a jar file, then this function will throw a RuntimeException.
  
  @param modelName
  The name of the model file. Iff it ends in .gz, then it is assumed
  to be gzip compressed.
  @param props
  A Properties object which can override certain properties in the
  serialized file, such as the DocumentReaderAndWriter. You can pass
  in <code>null</code> to override nothing.