Java rest api with eclipse

I am new to elastic search ,i don't find the way that how can i use java rest api with eclipse.Should i have to download it first.From where can i download this api.

That depends on the version of ES you are using.

Before 5.0 the Java client would not go through REST. For more documentation see here: https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html

After 5.0 there will be a Java REST client. See https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html for more information.

For more general information on which client to pick see also https://www.elastic.co/blog/found-interfacing-elasticsearch-picking-client - old-ish and maybe out of date but with a bigger focus on Java: https://www.elastic.co/blog/found-java-clients-for-elasticsearch

Hope this helps,
Isabel