Put it into a JAR file. Dig around in your Java books, they'll give you all the details.
If you need a good book, I always suggest "Thinking In Java", edition 2. You can buy one in any bookstore, OR get it for FREE!! Go to www.bruceeckel.com, and follow your nose to the download area...