# Support Diagnostic tool

**URL:** <https://discuss.elastic.co/t/support-diagnostic-tool/130598>\
**Category:** Elasticsearch\
**Created:** [May 4, 2018, 9:20am UTC](https://discuss.elastic.co/t/support-diagnostic-tool/130598 "2018-05-04T09:20:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Pm](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rahul\_Pm](https://discuss.elastic.co/u/Rahul_Pm)\
**Post date:** [May 4, 2018, 9:20am UTC](https://discuss.elastic.co/t/support-diagnostic-tool/130598/1 "2018-05-04T09:20:19Z")

</div>

Hi,  
I'm trying to run the support diagnostic tool on my ELK node.  
The JAVA\_HOME variable is set. But i get an error that says:  
" Could not find or load main com.elastic.support.diagnostics.diagnosticapp "  
Please help.  
Regards,  
Rahul

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [May 4, 2018, 9:56am UTC](https://discuss.elastic.co/t/support-diagnostic-tool/130598/2 "2018-05-04T09:56:55Z")

</div>

This error is unrelated to JAVA\_HOME means the jar file which contains the class is not in the classpath, ie do you use this and are the jar files in the lib folder:  
"$JAVA" $DIAG\_JAVA\_OPTS ${DIAG\_DEBUG\_OPTS} **-cp .:./lib/** \* com.elastic.support.diagnostics.DiagnosticApp "$@"

---

<div class="post-metadata">

**Author:** ![Rahul\_Pm](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rahul\_Pm](https://discuss.elastic.co/u/Rahul_Pm)\
**Post date:** [May 4, 2018, 9:59am UTC](https://discuss.elastic.co/t/support-diagnostic-tool/130598/3 "2018-05-04T09:59:13Z")

</div>

Hi Julien,  
This is how the diagnostic.bat looks.

@echo off  
setlocal enabledelayedexpansion

set JAVA\_EXEC=java  
if not defined JAVA\_HOME (  
set JAVA\_EXEC=java  
echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA\_HOME environment variable.  
) else (  
echo JAVA\_HOME found, using !JAVA\_HOME!  
set JAVA\_EXEC=!JAVA\_HOME!\bin\java  
)

if not defined DIAG\_JAVA\_OPTIONS (  
set DIAG\_JAVA\_OPTIONS=-Xmx512m  
)

"%JAVA\_EXEC%" %DIAG\_JAVA\_OPTIONS% -cp .;.\lib\* com.elastic.support.diagnostics.DiagnosticApp %\*

endlocal

---

<div class="post-metadata">

**Author:** ![Rahul\_Pm](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rahul\_Pm](https://discuss.elastic.co/u/Rahul_Pm)\
**Post date:** [May 4, 2018, 10:00am UTC](https://discuss.elastic.co/t/support-diagnostic-tool/130598/4 "2018-05-04T10:00:04Z")

</div>

I haven't made any changes.  
Was hoping this would work by default.

---

<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:** [June 1, 2018, 10:00am UTC](https://discuss.elastic.co/t/support-diagnostic-tool/130598/5 "2018-06-01T10:00:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
