The best one is phpBB, which is written in php, obviously. If you have to use Java, you might be able to find some on sourceforge.net or freshmeat.net. As far as I know, there isn't any good java bb out there yet. I remember there is one called JIVE, but not longer free.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com