How do I make my list filter in Java usable in Automator as a service? A friend of mine has written me a small Java application that is used to filter two lists of words (used for work sadly). Currently I would run the application in the terminal like so:

java ListFilter file1.txt file2.txt &gt; file3.txt


I would like to be able to make this into an automator service where I can select "file1.txt" as the original list and then "file2.txt" as the filter words and then output the third file which would be the consolidated list in the same directory.

However, I have no idea how to do this and need a bit of direction. 

Thanks in advance.
You will need to use the Run Shell Script task within Automator. The tricky bit will be choosing and passing in the various paths.

Here are a few tutorials for creating this kind of Automator Workflow:


Automator Programming Guide: Creating Shell Script Actions
Creating a Shell Script Automator Action
How to build Mac OS X services with Automator and shell scripting