# Embed Logstash Agent within Java Process

**URL:** <https://discuss.elastic.co/t/embed-logstash-agent-within-java-process/24009>\
**Category:** Logstash\
**Created:** [June 19, 2015, 6:07pm UTC](https://discuss.elastic.co/t/embed-logstash-agent-within-java-process/24009 "2015-06-19T18:07:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfili](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@cfili](https://discuss.elastic.co/u/cfili)\
**Post date:** [June 19, 2015, 6:07pm UTC](https://discuss.elastic.co/t/embed-logstash-agent-within-java-process/24009/1 "2015-06-19T18:07:04Z")

</div>

Hi,  
I am playing around with the idea of embedding a Logstash agent inside of another Java process. Does anyone have experience doing so? I am trying to use [Redbridge](https://github.com/jruby/jruby/wiki/RedBridge) to launch the Logstash runner.rb inside of a script container, but having issues setting the loadpaths appropriately for its dependencies. Any insight would be appreciated.

---

<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 6, 2017, 5:37am UTC](https://discuss.elastic.co/t/embed-logstash-agent-within-java-process/24009/2 "2017-07-06T05:37:02Z")

</div>


