This is a library for doing path finding implemented in Java. It is intended for reuse in Java projects. It provides an interface for describing path finding algorithms, a Depth First implementation and an A* (astar) implementation. The A* implementation was derived from the excellent description given by Bryan Stout in Game Programming Gems.
You can peruse the online Javadoc API documentation.
Demo Applet
This applet demonstrates the path finding functionality. The green dot is the start node, the red dot is the goal node. A grey square represents a location that is easily traversable. A blue square costs a lot to traverse into or out of. A black square is impassable.
You can create a new obstacle by clicking on the map. You can create a new blockage by pressing Control and clicking on the map. You can clear a location by pressing Shift and clicking on the map.
You can pick which algorithm gets used. A* will take into account the cost of blue squares and avoid going onto or off of them. Depth First will only take into account the black squares.