# Elasticsearch Java Client

**URL:** <https://discuss.elastic.co/t/elasticsearch-java-client/64723>\
**Category:** Elasticsearch\
**Created:** [November 2, 2016, 2:27pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723 "2016-11-02T14:27:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvenkat\_in](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mvenkat\_in](https://discuss.elastic.co/u/mvenkat_in)\
**Post date:** [November 2, 2016, 2:27pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/1 "2016-11-02T14:27:25Z")

</div>

I am trying to write my first java client to query the index and aggregate and store the result in another index.

I have downloaded the ES 5.0 and the lib inside that.

Can a Build a simple project (a standalone java application) without using maven with the jar files in the lib folder !!

I have never used maven or others - So can I just develop without those !!

BTW - I have tried to create a maven project with the help of google in netbeans with the following dependencies  
\<  
  
org.elasticsearch  
elasticsearch  
5.0.0  
  
  
org.elasticsearch.client  
transport  
5.0.0  
  
  
org.apache.logging.log4j  
log4j-api  
2.7  
test  
  
  
org.apache.logging.log4j  
log4j-core  
2.7  
test

However it is unable to locate the class PreBuiltTransportClient

Thanks

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 2, 2016, 2:46pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/2 "2016-11-02T14:46:20Z")

</div>

> [@mvenkat\_in](#):
>
> I have never used maven or others - So can I just develop without those !!

If you want to develop in Java you should use something like maven or gradle or ant/ivy or _something_ to resolve the dependencies. If you refuse to use those tools you are still going to need to understand them because they are **so** common that people will explain things in those terms.

If you don't want to use maven then use maven to resolve the dependencies and then copy the libraries it lists as dependencies to your dependencies directory.

---

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [November 2, 2016, 2:51pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/3 "2016-11-02T14:51:45Z")

</div>

Read this maybe : [5.0 alpha 5 Java API: PreBuiltTransportClient class missing](https://discuss.elastic.co/t/5-0-alpha-5-java-api-prebuilttransportclient-class-missing/58205/2)

---

<div class="post-metadata">

**Author:** ![mvenkat\_in](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mvenkat\_in](https://discuss.elastic.co/u/mvenkat_in)\
**Post date:** [November 2, 2016, 11:52pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/4 "2016-11-02T23:52:05Z")

</div>

Hi  
Thanks for your explanation. I am not a skilled java developer and more from support domain, hence don't know these tools or frameworks. However know the bit of core java programming.  
Wanted to check if I can just download all the dependent jar files and put them in a lib folder and class path and start developing.  
Is there any way to do this.. Or does it mention list of all required jars and location to download.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 3, 2016, 12:06am UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/5 "2016-11-03T00:06:20Z")

</div>

Yeah, the way to do this is to resolve the dependencies using something like maven or ivy or gradle or sbt. There isn't a master list.

---

<div class="post-metadata">

**Author:** ![mvenkat\_in](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mvenkat\_in](https://discuss.elastic.co/u/mvenkat_in)\
**Post date:** [November 4, 2016, 5:37am UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/6 "2016-11-04T05:37:58Z")

</div>

Thanks. I figured it out and could successfully test the java client.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [November 4, 2016, 12:16pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/7 "2016-11-04T12:16:41Z")

</div>

You should use version 2.6.2 of the Log4j dependencies for version 5.0.0 of Elasticsearch, otherwise you will see `NoClassDefFoundError`s for `org.apache.logging.log4j.core.async.DaemonThreadFactory`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:06pm UTC](https://discuss.elastic.co/t/elasticsearch-java-client/64723/8 "2017-07-05T22:06:32Z")

</div>


