# Error in setting Java\_HOME and Java\_path to make java available for the system

**URL:** <https://forum.ansible.com/t/error-in-setting-java-home-and-java-path-to-make-java-available-for-the-system/15690>\
**Category:** Ansible Project\
**Created:** [July 17, 2014, 12:09pm UTC](https://forum.ansible.com/t/error-in-setting-java-home-and-java-path-to-make-java-available-for-the-system/15690 "2014-07-17T12:09:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nandha\_Kumar](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@Nandha\_Kumar](https://forum.ansible.com/u/Nandha_Kumar)\
**Post date:** [July 17, 2014, 12:09pm UTC](https://forum.ansible.com/t/error-in-setting-java-home-and-java-path-to-make-java-available-for-the-system/15690/1 "2014-07-17T12:09:38Z")

</div>

Hi,

I want to know , how to set java home and java path through ansible playbook or else is there any other way to make java available to the system.

I have tried using lineinfile and copy the src file and template structure.

please assist me in solving this issue.

Thanks and Regards  
Nandha kumar  
Bangalore,IN

---

<div class="post-metadata">

**Author:** ![hariharan4114](https://avatars.discourse-cdn.com/v4/letter/h/5e9695/32.png) [@hariharan4114](https://forum.ansible.com/u/hariharan4114)\
**Post date:** [August 18, 2014, 8:16am UTC](https://forum.ansible.com/t/error-in-setting-java-home-and-java-path-to-make-java-available-for-the-system/15690/2 "2014-08-18T08:16:49Z")

</div>

Hi Nandha,

Where you able to solve this issue?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 18, 2014, 12:38pm UTC](https://forum.ansible.com/t/error-in-setting-java-home-and-java-path-to-make-java-available-for-the-system/15690/3 "2014-08-18T12:38:02Z")

</div>

Should you need to control environment variables when running tasks see the information here:

[http://docs.ansible.com/playbooks\_environment.html](http://docs.ansible.com/playbooks_environment.html)

If I’m misunderstanding the question and this is about user setup, it sounds like you may just wish to template out the .bashrc.

If that doesn’t quite follow, we’re probably going to need more information showing the playbok line that is causing problems and more information about your use case.

Thanks!
