# Java Node Client - path.home is not configured

**URL:** <https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653>\
**Category:** Elasticsearch\
**Created:** [November 3, 2015, 4:33pm UTC](https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653 "2015-11-03T16:33:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shawn\_Johnson](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@Shawn\_Johnson](https://discuss.elastic.co/u/Shawn_Johnson)\
**Post date:** [November 3, 2015, 4:33pm UTC](https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653/1 "2015-11-03T16:33:29Z")

</div>

I am trying to use the Java Node Client and connect to a separate local elasticsearch node, running in a separate JVM. I get the following error when trying to follow the examples provided in the docs ([https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/node-client.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/node-client.html)).

Code:

```
Node node = NodeBuilder.nodeBuilder()
        .client(true)
        .local(false)
        .settings(Settings.settingsBuilder().put("cluster.name", ES_CLUSTER_NAME))
        .node();

```

Error:

> Exception in thread "main" java.lang.IllegalStateException: path.home is not configured  
> at org.elasticsearch.env.Environment.(Environment.java:99)  
> at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:82)  
> at org.elasticsearch.node.Node.(Node.java:128)  
> at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)  
> at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:152)

I could obviously add a "path.home" to the settings, but I just don't see this documented anywhere - so what should the value be, and why do I need to set it?

thanks!

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 3, 2015, 11:19pm UTC](https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653/2 "2015-11-03T23:19:22Z")

</div>

`path.home` is documented at [https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-dir-layout.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-dir-layout.html)

A client node is a real node, in contrast to a transport client.

You need to pass `path.home` to a node so it knows where to lookup configuration files or a place to write logs or save cluster state data .

---

<div class="post-metadata">

**Author:** ![Shawn\_Johnson](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@Shawn\_Johnson](https://discuss.elastic.co/u/Shawn_Johnson)\
**Post date:** [November 4, 2015, 11:08pm UTC](https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653/3 "2015-11-04T23:08:58Z")

</div>

Thanks for the reply.

For those others that might be hitting this error... I'm running a simple Java program from eclipse. In the launch profile I added:

```
-Des.path.home=/myproject/path

```

Since I save the launch file to be shared by the other developers on the team, I use an eclipse variable as the path.

```
-Des.path.home=${project_loc:/ElasticLoader}
```

---

<div class="post-metadata">

**Author:** ![Prakash\_P](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@Prakash\_P](https://discuss.elastic.co/u/Prakash_P)\
**Post date:** [December 7, 2016, 1:22am UTC](https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653/4 "2016-12-07T01:22:07Z")

</div>

I tried running from eclipse by setting -Des.path.home=/myproject/path in VM arguments in Run configuration, but i am still facing the issue

---

<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:05pm UTC](https://discuss.elastic.co/t/java-node-client-path-home-is-not-configured/33653/5 "2017-07-05T22:05:13Z")

</div>


