# Run graph from command line throws error

**URL:** <https://forum.cloverdx.com/t/run-graph-from-command-line-throws-error/1337>\
**Category:** CloverDX Platform\
**Created:** [February 2, 2014, 12:00am UTC](https://forum.cloverdx.com/t/run-graph-from-command-line-throws-error/1337 "2014-02-02T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyparask](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/jyparask/32/116_2.png) [@jyparask](https://forum.cloverdx.com/u/jyparask)\
**Post date:** [February 2, 2014, 12:00am UTC](https://forum.cloverdx.com/t/run-graph-from-command-line-throws-error/1337/1 "2014-02-02T00:00:00Z")

</div>

Hi,

I am using the community edition 3.5.0.057. I have created my first graph, which runs great from the designer. Now i want to be able to run this graph from the command line.

My installation is at:  
C:\Program Files\CloverETL Designer Community

My workspace is at:  
C:\CloverETL\MyCompany\MyProject

I know “clover.bat” is located at the following folder:  
C:\Program Files\CloverETL Designer Community\plugins\com.cloveretl.gui\_3.5.0.057\lib\bin

What i have tried is run the following command, while being in the clover.bat directory:  
clover.bat C:\CloverETL\MyCompany\MyProject\Graph\MyGraph.grf

This gives me the following error:  
“java.exe”’ is not recognized as an internal or external command,operable program or batch file.

Do i need to specify somehow or somewhere the location of the java installation?

Thanks in advance,  
Giannis

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [February 6, 2014, 10:39am UTC](https://forum.cloverdx.com/t/run-graph-from-command-line-throws-error/1337/2 "2014-02-06T10:39:08Z")

</div>

Hi Giannis,

Please make sure path to your Java installation (it may be the one installed with CloverETL) is in your PATH environment variable. Also it would make a sense to have JAVA\_HOME set.

---

<div class="post-metadata">

**Author:** ![jyparask](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/jyparask/32/116_2.png) [@jyparask](https://forum.cloverdx.com/u/jyparask)\
**Post date:** [February 6, 2014, 10:50am UTC](https://forum.cloverdx.com/t/run-graph-from-command-line-throws-error/1337/3 "2014-02-06T10:50:37Z")

</div>

Thanks for the reply.

I am not sure where to set JAVA\_HOME. Can you please give me an example in the bat file? I am really not a java person (i am into .Net) and i am not aware of how java really works.

Giannis

---

<div class="post-metadata">

**Author:** ![novakj](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@novakj](https://forum.cloverdx.com/u/novakj)\
**Post date:** [February 12, 2014, 2:43pm UTC](https://forum.cloverdx.com/t/run-graph-from-command-line-throws-error/1337/4 "2014-02-12T14:43:07Z")

</div>

Hi Giannis,

The PATH environment variable is a series of directories separated by semicolons (;). Microsoft Windows looks for programs in the PATH directories in order, from left to right. You can also use set JAVA\_HOME environment variable and you can use %JAVA\_HOME% instead of writing full path to Java home directory.

**To set JAVA\_HOME variable:**  
1. Right click My Computer and select Properties.  
2. On the Advanced tab, select Environment Variables, and then edit JAVA\_HOME to point to where the Java software is located, for example, C:\Program Files\Java\jdk1.6.0.

**To update PATH variable:**  
1. Right click My Computer and select Properties.  
2. On the Advanced tab, select Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.

In the Edit System Variable (or New System Variable) window, add path to the  
Java executable, for example %JAVA\_HOME%\bin if you have set the JAVA\_HOME variable.

Click OK. Close all remaining windows by clicking OK.

Now you can run Java executables (javac.exe, java.exe and so on) from any directory without having to type the full path of the command.
