# Executing a Java file in Ignition

**URL:** <https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522>\
**Category:** General Discussion\
**Tags:** scripting\
**Created:** [April 30, 2019, 6:34pm UTC](https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522 "2019-04-30T18:34:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timothy.tickner](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@timothy.tickner](https://forum.inductiveautomation.com/u/timothy.tickner)\
**Post date:** [April 30, 2019, 6:34pm UTC](https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522/1 "2019-04-30T18:34:50Z")

</div>

Hey all,

I’m using an RFID reader made by Impinj to constantly read RFIDs entering and leaving an area. Impinj has a proprietary SDK called Octane SDK and gives some sample Java code. I took one of the sample programs and reformatted it so that it outputs I need in comma separated format. I compiled that sample file (and 2 others it depended on) and put them into the com\impinj\octane folder in the .jar file. I then put the .jar file into Ignition\lib\core\gateway. My question is: how am I able to execute my .class file located in the .jar, called ReadTags?

When I execute ReadTags in Command Line, it opens a connection with the reader and continues giving me data until I press Enter. I’m envisioning something like:

```auto
from com.impinj.octane import ReadTagsPeriodicTrigger

reader1 = ReadTagsPeriodicTrigger('10.18.71.100')

```

I realize that I may have approached this a little abnormally so I’m open to any and all feedback.

Thank you in advance!

**EDIT: Modified the code to remove a . in line 2**

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 30, 2019, 6:45pm UTC](https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522/2 "2019-04-30T18:45:18Z")

</div>

A decent start. I’m not familiar with that product, but you’ll probably want to figure out what part of the library invokes a callback or `Consumer`-type interface and use that. You do not want to use console operations.

---

<div class="post-metadata">

**Author:** ![timothy.tickner](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@timothy.tickner](https://forum.inductiveautomation.com/u/timothy.tickner)\
**Post date:** [April 30, 2019, 8:27pm UTC](https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522/3 "2019-04-30T20:27:27Z")

</div>

Hmm. I’m not familiar with the callback or consumer interface. Does it have a popular name in programming, something I can look for?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 30, 2019, 8:36pm UTC](https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522/4 "2019-04-30T20:36:11Z")

</div>

I would have thought those are the common names… /-:

Try starting [here](https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html).

These are generally related to asynchronous and/or functional programming.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 30, 2019, 9:02pm UTC](https://forum.inductiveautomation.com/t/executing-a-java-file-in-ignition/24522/5 "2019-04-30T21:02:46Z")

</div>

We don’t know anything about your library or its API so I’m not sure we can offer any advice on how you’re supposed to call it.
