Dependencies with elasticsearch

i'm new with elasticsearch and i'm trying to make a java application that will allow me to communicate with a cluster elasticsearch . i started with creating a maven project and in the pom.xml i have put in my pom.xml the code bellow:


in the main class i have put :slight_smile:

import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.*;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.node.Node;


import static java.lang.System.out;
import static org.elasticsearch.common.xcontent.XContentFactory.*;
import static org.elasticsearch.node.NodeBuilder.*;

public class ELK_connexion {

	public static void main (String[] args){
	 // ES client creation
    Node node = nodeBuilder().node();
    Client client = new TransportClient()
                   .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));

but the import; didn't work and i have errors :Description Resource Path Location Type
The constructor InetSocketTransportAddress(String, int) is undefined
Description Resource Path Location Type
The constructor TransportClient() is undefined

can anyone tell me what is the problem
thanks a lot

Please format your code.

And read this:

ok thank you @dadoonet but do you know why the import; is not working

I modified your question so formatting is better.

why the import;

Why are you importing it?

thanks for your answer it helped me and yes i didn't need this