# Logstash-plugin command does not work as expected

**URL:** <https://discuss.elastic.co/t/logstash-plugin-command-does-not-work-as-expected/300857>\
**Category:** Logstash\
**Created:** [March 28, 2022, 2:48pm UTC](https://discuss.elastic.co/t/logstash-plugin-command-does-not-work-as-expected/300857 "2022-03-28T14:48:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpride63](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mpride63](https://discuss.elastic.co/u/mpride63)\
**Post date:** [March 28, 2022, 2:48pm UTC](https://discuss.elastic.co/t/logstash-plugin-command-does-not-work-as-expected/300857/1 "2022-03-28T14:48:33Z")

</div>

I have Logstash working in a basic test scenario on a Windows server but I need to install a plugin. The problem is that the plugin command doesn't seem to work. No matter what option I run the logstash-plugin.bat with all I ever get is the output below:

"Using bundled JDK: ."

I've read a couple of articles where others have had a similar issue but I have not found a resolution yet. Can anyone point me in the correct direction?

---

<div class="post-metadata">

**Author:** ![v4mos](https://avatars.discourse-cdn.com/v4/letter/v/b77776/32.png) [@v4mos](https://discuss.elastic.co/u/v4mos)\
**Post date:** [April 7, 2022, 7:51am UTC](https://discuss.elastic.co/t/logstash-plugin-command-does-not-work-as-expected/300857/2 "2022-04-07T07:51:49Z")

</div>

Had the same issue on Windows (no java installed on the system).

Whe using the logstash-plugin.bat I would always get:  
"Using bundled JDK: ." followed by "...no java.exe found..."  
It's definetly a bug where the logstash-plugin is not using the bundeld JDK correctly.

After setting PATH to the bundeld JDK I would get the same single output line as you, no matter what:  
"Using bundled JDK: ."

Setting JAVA\_HOME to the bundeld JDK fixed the Problem for me:

1. Go to Windows Environment Variables
2. Create a new System Variable with the Name "JAVA\_HOME"
3. Add the Path to the bundeld logstash JDK ([...]/logstash-X.X.X/jdk)

Be aware that setting JAVA\_HOME can be problematic if you have other java installations on the system. For my case it works.

---

<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:** [May 5, 2022, 7:52am UTC](https://discuss.elastic.co/t/logstash-plugin-command-does-not-work-as-expected/300857/3 "2022-05-05T07:52:13Z")

</div>

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