code: public static Main mainEmbedded(String title) {
          ContextFactory factory = ContextFactory.getGlobal();
          Global global = new Global();
          global.init(factory);
          return mainEmbedded(factory, global, title);
      }
docs: Entry point for embedded applications.  This method attaches
  to the global {@link ContextFactory} with a scope of a newly
  created {@link Global} object.  No I/O redirection is performed
  as with {@link #main(String[])}.