# How to set path.home in ubunu?

**URL:** <https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028>\
**Category:** Elasticsearch\
**Created:** [February 5, 2016, 7:30am UTC](https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028 "2016-02-05T07:30:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajnikant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajnikant/32/6490_2.png) [@Rajnikant](https://discuss.elastic.co/u/Rajnikant)\
**Post date:** [February 5, 2016, 7:30am UTC](https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028/1 "2016-02-05T07:30:38Z")

</div>

i used eclipse for java programming.  
when i connect to elastic search to java then i got "path.home is not configured" this type of error.  
My code is

Settings settings = Settings.settingsBuilder()  
.put("path.home", "/home/amit/elasticsearch-2.1.0/bin").build();  
TransportClient client = TransportClient.builder().settings(settings).build();

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 5, 2016, 7:56am UTC](https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028/2 "2016-02-05T07:56:10Z")

</div>

```auto
Settings settings = Settings.settingsBuilder()
        .put("path.home", "/home/amit/elasticsearch-2.1.0").build();
Client client = TransportClient.builder().settings(settings).build();

```

Note that it can be any path. You don't need to have an elasticsearch locally installed to use a transport client. So basically `/tmp` might work as well...

I think it has been solved recently (the fact you have to define `path.home`) but unsure though. May be you could test with 2.2.0?

---

<div class="post-metadata">

**Author:** ![Rajnikant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajnikant/32/6490_2.png) [@Rajnikant](https://discuss.elastic.co/u/Rajnikant)\
**Post date:** [February 5, 2016, 8:20am UTC](https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028/3 "2016-02-05T08:20:57Z")

</div>

i use this and i get "path.home is not configured" this type of error.  
how to configured home path?  
i also use 2.2.0 but still that not resolved.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 5, 2016, 8:52am UTC](https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028/4 "2016-02-05T08:52:32Z")

</div>

That's strange. Actually this has been fixed months ago (in 2.0.0).

Here is my code:

```auto
        Settings settings = Settings.settingsBuilder()
                .put("cluster.name", clusterName).build();

        Client client = TransportClient.builder().settings(settings).build()
                .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 9300)))
                .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 9301)));

```

I don't have to set anything else.

This message is more an error message when you try to start a Node from Java. May be you are doing integration tests or something?

---

<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, 11:18pm UTC](https://discuss.elastic.co/t/how-to-set-path-home-in-ubunu/41028/5 "2017-07-05T23:18:40Z")

</div>


