| 100 | } |
| 101 | |
| 102 | public static ServerMain create(String root, Map<String, String> env) { |
| 103 | final Map<String, String> newEnv = new HashMap<>(System.getenv()); |
| 104 | newEnv.putAll(env); |
| 105 | PropBootstrapConfiguration bootstrapConfiguration = new PropBootstrapConfiguration() { |
| 106 | @Override |
| 107 | public Map<String, String> getEnv() { |
| 108 | return newEnv; |
| 109 | } |
| 110 | }; |
| 111 | |
| 112 | return new ServerMain(new Bootstrap(bootstrapConfiguration, Bootstrap.getServerMainArgs(root))); |
| 113 | } |
| 114 | |
| 115 | public static ServerMain create(String root) { |
| 116 | return new ServerMain(Bootstrap.getServerMainArgs(root)); |