How to connect java to local elastic search?

i want to connect my local elastic search to java.

Thanks for give fast reply.
i already used this.
My Code is:
Node node = nodeBuilder()
.settings(ImmutableSettings.settingsBuilder().put("path.home", "/home/amit/elasticsearch-2.1.0/bin"))
Client client = node.client();

When i used "ImmutableSettings" in elasticsearch 2.1.1 then i got "ImmutableSettings cannot be resolved" this type of error.

Please help me out...

Try using the TransportClient instead of the NodeBuilder