# Looking for an example plugin that uses a Java library

**URL:** <https://discuss.elastic.co/t/looking-for-an-example-plugin-that-uses-a-java-library/23898>\
**Category:** Logstash\
**Created:** [June 18, 2015, 10:13am UTC](https://discuss.elastic.co/t/looking-for-an-example-plugin-that-uses-a-java-library/23898 "2015-06-18T10:13:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niels\_Basjes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niels_basjes/32/109091_2.png) [@Niels\_Basjes](https://discuss.elastic.co/u/Niels_Basjes)\
**Post date:** [June 18, 2015, 10:13am UTC](https://discuss.elastic.co/t/looking-for-an-example-plugin-that-uses-a-java-library/23898/1 "2015-06-18T10:13:16Z")

</div>

Hi ,  
I'm looking to see if I can wrap my apache logparsing library ([https://github.com/nielsbasjes/logparser/](https://github.com/nielsbasjes/logparser/) ) (which was written in Java) to become a plugin for logstash.  
The problem I have is that my Ruby knowledge is close to zero (and the plugins are written in ruby )  
What I 'm looking for is a working example of a plugin that receives a few parameters and uses a java library to do the actual work.  
From there I expect I can figure out what needs to be done and write the plugin.

Can you please giveme some pointers that help me get up and running?  
Thanks.

Niels Basjes

---

<div class="post-metadata">

**Author:** ![Joe\_Lawson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_lawson/32/3390_2.png) [@Joe\_Lawson](https://discuss.elastic.co/u/Joe_Lawson)\
**Post date:** [June 18, 2015, 1:52pm UTC](https://discuss.elastic.co/t/looking-for-an-example-plugin-that-uses-a-java-library/23898/2 "2015-06-18T13:52:52Z")

</div>

Check out jruby-kafka ([https://github.com/joekiller/jruby-kafka](https://github.com/joekiller/jruby-kafka)) which uses java for [https://github.com/logstash-plugins/logstash-output-kafka](https://github.com/logstash-plugins/logstash-output-kafka) and [https://github.com/logstash-plugins/logstash-input-kafka](https://github.com/logstash-plugins/logstash-input-kafka)

The keys are that the jruby-kafka library uses

> <https://github.com/joekiller/jruby-kafka/blob/master/jruby-kafka.gemspec#L21-L22>

  
jar-dependencies and ruby-maven. When you run `rake setup jar` it'll  
download the jar dependencies and create a [libname]\_jars.rb file within  
the root of your library.  

> <https://github.com/joekiller/jruby-kafka/blob/master/Rakefile#L1-L13>

On Thu, Jun 18, 2015 at 9:48 AM, Joe Lawson \<  
[jlawson@opensourceconnections.com](mailto:jlawson@opensourceconnections.com)\> wrote:

---

<div class="post-metadata">

**Author:** ![Niels\_Basjes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niels_basjes/32/109091_2.png) [@Niels\_Basjes](https://discuss.elastic.co/u/Niels_Basjes)\
**Post date:** [June 19, 2015, 7:07pm UTC](https://discuss.elastic.co/t/looking-for-an-example-plugin-that-uses-a-java-library/23898/4 "2015-06-19T19:07:22Z")

</div>

Thanks. This looks really helpful.

---

<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/looking-for-an-example-plugin-that-uses-a-java-library/23898/5 "2017-07-06T05:37:01Z")

</div>


