Hello, how should I initialization PreBuiltXPackTransportClient I opened the x - pack
Elasticsearch version :
6.5.4
Plugins installed :
x-pack
JVM version:
jdk1.8
OS version :
win10
Description of the problem including expected versus actual behavior :
I see official support only to es6.0,https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html
Settings settings = Settings.builder()
                  // es 集群的名称
                  .put("cluster.name", "elasticsearch")
                  .put("client.transport.sniff", "true")
                  //账号密码
                  .put("xpack.security.user", "elastic:123456")
                  .build();
          client = new PreBuiltXPackTransportClient(settings)
                  //添加集群节点
                  .addTransportAddresses(new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300);
The exception that occurs after this setting
java.lang.NoSuchMethodError: org.elasticsearch.common.settings.Settings$Builder.put([Ljava/lang/Object;)Lorg/elasticsearch/common/settings/Settings$Builder